[Bug c/30426] Warning when using strndup

2007-01-10 Thread schwab at suse dot de
--- Comment #1 from schwab at suse dot de 2007-01-10 20:37 --- strndup is a GNU extension and is only declared in string.h when _GNU_SOURCE is defined. -- schwab at suse dot de changed: What|Removed |Added

[Bug c/30426] Warning when using strndup

2007-01-10 Thread pinskia at gcc dot gnu dot org
--- Comment #2 from pinskia at gcc dot gnu dot org 2007-01-10 20:38 --- Not a bug, strndup is a GNU (glibc) extension. You have to use -D_GNU_SOURCE when compiling. The warning messages are correct as there is no prototype for strndup. --