summaryrefslogtreecommitdiff
path: root/lib/server/Daemon.cpp
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2013-09-30 08:28:58 +0000
committerChris Wilson <chris+github@qwirx.com>2013-09-30 08:28:58 +0000
commitdae6303135c66acdd0e4f3985c6e5c95334aea7f (patch)
tree173acec5f3e34ef870f4e283c7403e10b097cd0e /lib/server/Daemon.cpp
parentcaa198fee3d6a9df3d2fbed4923b4b8ad554c706 (diff)
Fix getopt header confusion.
Our copy of getopt.h in lib/win32 was beating the system getopt.h in the search path, and providing different definitions, which clang picked up. Renamed our getopt.h to bsd_getopt.h, and added a box_getopt.h to decide whether to include this one instead of the system getopt.h.
Diffstat (limited to 'lib/server/Daemon.cpp')
-rw-r--r--lib/server/Daemon.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/server/Daemon.cpp b/lib/server/Daemon.cpp
index 7419f973..1562b6e8 100644
--- a/lib/server/Daemon.cpp
+++ b/lib/server/Daemon.cpp
@@ -368,7 +368,7 @@ int Daemon::ProcessOptions(int argc, const char *argv[])
// reset getopt, just in case anybody used it before.
// unfortunately glibc and BSD differ on this point!
// http://www.ussg.iu.edu/hypermail/linux/kernel/0305.3/0262.html
- #if HAVE_DECL_OPTRESET == 1 || defined WIN32
+ #if HAVE_DECL_OPTRESET == 1 || defined BOX_BSD_GETOPT
optind = 1;
optreset = 1;
#elif defined __GLIBC__