diff OrthancServer/DicomProtocol/DicomUserConnection.cpp @ 890:816dccaeb7cf

Support of kFreeBSD
author jodogne
date Mon, 16 Jun 2014 15:39:16 +0200
parents 84513f2ee1f3
children 27d256e0b458
line wrap: on
line diff
--- a/OrthancServer/DicomProtocol/DicomUserConnection.cpp	Sat Jun 14 15:50:02 2014 +0200
+++ b/OrthancServer/DicomProtocol/DicomUserConnection.cpp	Mon Jun 16 15:39:16 2014 +0200
@@ -107,6 +107,18 @@
 #endif 
 
 
+#if defined(__FreeBSD_kernel__)
+/**
+ * TO IMPROVE: "_POSIX_HOST_NAME_MAX is only the minimum value that
+ * HOST_NAME_MAX can ever have [...] Therefore you cannot allocate an
+ * array of size _POSIX_HOST_NAME_MAX, invoke gethostname() and expect
+ * that the result will fit."
+ * http://lists.gnu.org/archive/html/bug-gnulib/2009-08/msg00128.html
+ **/
+#define HOST_NAME_MAX _POSIX_HOST_NAME_MAX
+#endif
+
+
 static const char* DEFAULT_PREFERRED_TRANSFER_SYNTAX = UID_LittleEndianImplicitTransferSyntax;
 
 /**