Fix compilation warnings around _BSD_SOURCE.

This commit is contained in:
Roger A. Light 2018-05-02 09:39:36 +01:00
parent 2d1667b120
commit 5b4a4cfc6a
4 changed files with 6 additions and 5 deletions

View File

@ -1,3 +1,4 @@
#ifndef CONFIG_H
/* ============================================================
* Control compile time options.
* ============================================================
@ -28,5 +29,7 @@
#define uthash_malloc(sz) mosquitto__malloc(sz)
#define uthash_free(ptr,sz) mosquitto__free(ptr)
#define _BSD_SOURCE
#define _DEFAULT_SOURCE 1
#define _POSIX_C_SOURCE 200809L
#endif

View File

@ -200,7 +200,7 @@ mosquitto_passwd : mosquitto_passwd.o
${CROSS_COMPILE}${CC} $^ -o $@ ${LDFLAGS} $(PASSWD_LIBS)
mosquitto_passwd.o : mosquitto_passwd.c
${CROSS_COMPILE}${CC} $(CFLAGS) ${CPPFLAGS} -c $< -o $@
${CROSS_COMPILE}${CC} -I.. $(CFLAGS) ${CPPFLAGS} -c $< -o $@
plugin_defer.so : plugin_defer.c mosquitto_plugin.h mosquitto_broker.h mosquitto_broker_internal.h
${CROSS_COMPILE}${CC} -I. -I../lib -fPIC -shared $< -o $@

View File

@ -18,7 +18,6 @@ Contributors:
#ifndef WIN32
/* For initgroups() */
# define _DEFAULT_SOURCE
# include <unistd.h>
# include <grp.h>
# include <assert.h>

View File

@ -14,8 +14,7 @@ Contributors:
Roger Light - initial implementation and documentation.
*/
#define _POSIX_C_SOURCE 200809L
#define _DEFAULT_SOURCE
#include "config.h"
#include <errno.h>
#include <openssl/evp.h>