Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About : warning: "_POSIX_C_SOURCE" redefined #52

Open
patrickj-fd opened this issue Jan 30, 2021 · 0 comments
Open

About : warning: "_POSIX_C_SOURCE" redefined #52

patrickj-fd opened this issue Jan 30, 2021 · 0 comments

Comments

@patrickj-fd
Copy link

patrickj-fd commented Jan 30, 2021

When I compile my project with httpserver.h, occur warning :

./src/httpserver.h:295:0: warning: "_POSIX_C_SOURCE" redefined
 #define _POSIX_C_SOURCE 199309L
 
In file included from /usr/include/x86_64-linux-gnu/sys/types.h:25:0,
                 from /usr/include/x86_64-linux-gnu/curl/system.h:399,
                 from /usr/include/x86_64-linux-gnu/curl/curl.h:38,
                 from ./src/hr_darknet.c:1:
/usr/include/features.h:265:0: note: this is the location of the previous definition
# define _POSIX_C_SOURCE 200809L

Its must be '199309L' in the httpserver.h?

For fix the warning, can I modify httpserver.h like this:

#ifndef _POSIX_C_SOURCE
#define _POSIX_C_SOURCE
#endif

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant