chiark / gitweb /
Cope with various header files being missing.
[disorder] / lib / client.c
index 09e542693b9e5fb7376106138d3f504c197eedf3..08d70e762c1c37a87c2bf2c54638f354e8da1342 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * This file is part of DisOrder.
 /*
  * This file is part of DisOrder.
- * Copyright (C) 2004-2010 Richard Kettlewell
+ * Copyright (C) 2004-13 Richard Kettlewell
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
 #include "common.h"
 
 #include <sys/types.h>
 #include "common.h"
 
 #include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <sys/un.h>
-#include <unistd.h>
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+#if HAVE_NETINET_IN_H
+# include <netinet/in.h>
+#endif
+#if HAVE_SYS_UN_H
+# include <sys/un.h>
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
 #include <errno.h>
 #include <errno.h>
-#include <netdb.h>
-#include <pcre.h>
+#if HAVE_NETDB_H
+# include <netdb.h>
+#endif
+#if HAVE_PCRE_H
+# include <pcre.h>
+#endif
 
 #include "log.h"
 #include "mem.h"
 
 #include "log.h"
 #include "mem.h"