Kaynağa Gözat

test: fix testcpg build on FreeBSD9

HOST_NAME_MAX is intentionally NOT defined on BSD.

Users of HOST_NAME_MAX should be using sysconf or use very
conservative values.

limits.h still defines _POSIX_HOST_NAME_MAX. use that instead.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
Fabio M. Di Nitto 13 yıl önce
ebeveyn
işleme
9240c8d565
1 değiştirilmiş dosya ile 4 ekleme ve 0 silme
  1. 4 0
      test/testcpg.c

+ 4 - 0
test/testcpg.c

@@ -59,6 +59,10 @@
 #include <qb/qblog.h>
 #include <qb/qblog.h>
 #endif
 #endif
 
 
+#ifndef HOST_NAME_MAX
+#define HOST_NAME_MAX _POSIX_HOST_NAME_MAX
+#endif
+
 static int quit = 0;
 static int quit = 0;
 static int show_ip = 0;
 static int show_ip = 0;
 static int restart = 0;
 static int restart = 0;