mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-04-01 22:48:25 +00:00
BUILD: namespaces: fix a potential build warning in namespaces.c
I just met this warning today making me realize that haproxy's headers were included prior to the system ones, so all #ifndefs are taken first then the system redefines them. Simply move haproxy includes after the system's. This should be backported to 1.6 as well. In file included from /usr/include/bits/fcntl.h:61:0, from /usr/include/fcntl.h:35, from src/namespace.c:13: /usr/include/bits/fcntl-linux.h:203:0: warning: "F_SETPIPE_SZ" redefined [enabled by default] In file included from include/common/config.h:26:0, from include/proto/log.h:29, from src/namespace.c:7: include/common/compat.h:81:0: note: this is the location of the previous definition
This commit is contained in:
parent
e2e5bde3f2
commit
3fa0e2a745
@ -1,12 +1,5 @@
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#include <common/namespace.h>
|
||||
#include <common/compiler.h>
|
||||
#include <common/hash.h>
|
||||
#include <common/errors.h>
|
||||
#include <proto/log.h>
|
||||
#include <types/global.h>
|
||||
|
||||
#include <sched.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/stat.h>
|
||||
@ -16,6 +9,14 @@
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <common/namespace.h>
|
||||
#include <common/compiler.h>
|
||||
#include <common/hash.h>
|
||||
#include <common/errors.h>
|
||||
#include <proto/log.h>
|
||||
#include <types/global.h>
|
||||
|
||||
#ifdef CONFIG_HAP_NS
|
||||
|
||||
/* Opens the namespace <ns_name> and returns the FD or -1 in case of error
|
||||
|
Loading…
Reference in New Issue
Block a user