Set _XOPEN_SOURCE for random(3) and srandom(3).

These two functions are not defined when building with -ansi (which is set
in FindKDE4Internal.cmake). For glibc-based systems, defining _BSD_SOURCE
adds those functions back, but this macro is not portable.

Fix that by defining _XOPEN_SOURCE as well, since this one is recognized
across other systems. We could set it to 500, but 600 has been chosen to
keep it in sync with the rest of the patches I have sent upstream [1].

[1] http://sourceforge.net/mailarchive/message.php?msg_id=29786756

CCMAIL:	kiagiadakis.george@gmail.com


svn path=/branches/KDE/4.9/kdenetwork/krfb/; revision=1315649
This commit is contained in:
Raphael Kubo da Costa
2012-09-09 19:07:30 +00:00
parent eb85bfd08d
commit 636dd0ffc6

View File

@@ -24,6 +24,7 @@
#ifdef __STRICT_ANSI__
#define _BSD_SOURCE
#define _POSIX_SOURCE
#define _XOPEN_SOURCE 600
#endif
#ifdef LIBVNCSERVER_HAVE_SYS_TYPES_H
#include <sys/types.h>