Menu

#19 GCC 4.9 warns about unknown strdup

v4.2.6
closed-fixed
nobody
None
8
2017-01-19
2017-01-18
No

Use GNUSOURCE when strdup is not declared.

1 Attachments

Discussion

  • Matthieu Labas

    Matthieu Labas - 2017-01-18
    • status: open --> closed-fixed
    • Group: v4.2.4 --> v4.2.6
    • Priority: 5 --> 8
     
  • Matthieu Labas

    Matthieu Labas - 2017-01-18

    Thank you. I have applied your patch to v4.2.6.
    It's already pushed. I'll prepare the zip file later tonight.
    I'm curious though, which platform doesn't define strdup? It should be in <string.h>...</string.h>

     
  • Andreas Neustifter

    As you can see at https://linux.die.net/man/3/strdup the strdup needs at least _BSD_SOURCE enabled to be available on Linux.

     

Log in to post a comment.

MongoDB Logo MongoDB