2
0
Эх сурвалжийг харах

presence_dialoginfo(k): fix bsd compilation

On FreeBSD don't define _XOPEN_SOURCE (define it only on linux).
It's not needed for strptime() and worse will cause some other
defines to be missing, like INADDR_LOOPBACK ( if_XOPEN_SOURCE
 is defined, __BSD_VISIBLE will be undefined => lots of missing
 defines).

Reported-by: Reported-by: Olle E. Johansson  oej edvina net
(cherry picked from commit 850a7b31de86056fc9223d809dfae54b0e490c5f)
Andrei Pelinescu-Onciul 15 жил өмнө
parent
commit
cc3351c1b9

+ 3 - 3
modules_k/presence_dialoginfo/pidf.c

@@ -36,12 +36,12 @@
  * use 600 for 'Single UNIX Specification, Version 3'
  * _XOPEN_SOURCE creates conflict in header definitions in Solaris
  */
-#ifndef __OS_solaris
-	#define _XOPEN_SOURCE 600          /* glibc2 on linux, bsd */
+#ifdef __OS_linux
+	#define _XOPEN_SOURCE 600          /* glibc2 on linux */
 	#define _BSD_SOURCE 1				/* needed on linux to "fix" the effect
 										  of the above define on
 										  features.h/unistd.h syscall() */
-#else
+#elif defined __OS_solaris
 	#define _XOPEN_SOURCE_EXTENDED 1   /* solaris */
 #endif