1
0
mirror of https://invent.kde.org/network/krfb synced 2024-07-01 07:24:29 +00:00

Merge r1315649 by rkcosta.

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

svn path=/trunk/KDE/kdenetwork/krfb/; revision=1315651
This commit is contained in:
Raphael Kubo da Costa 2012-09-09 19:17:43 +00:00
parent dd2ced46ec
commit 5a3fdd3774

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>