maemo: Define _GNU_SOURCE to make llabs available.
authorTobias Brunner <tobias@strongswan.org>
Fri, 5 Aug 2011 12:36:11 +0000 (14:36 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 5 Aug 2011 12:40:01 +0000 (14:40 +0200)
llabs is defined in C99, thus requires e.g. _USE_ISOC99 to be defined.
features.h on Maemo defines _USE_ISOC99 in fewer cases than newer versions
of it do on other platforms.

packages/maemo-strongswan/debian/patches/llabs-needs-c99.patch [new file with mode: 0644]
packages/maemo-strongswan/debian/patches/series

diff --git a/packages/maemo-strongswan/debian/patches/llabs-needs-c99.patch b/packages/maemo-strongswan/debian/patches/llabs-needs-c99.patch
new file mode 100644 (file)
index 0000000..25aced4
--- /dev/null
@@ -0,0 +1,13 @@
+llabs is defined in C99. features.h on other platforms enables C99 features
+automatically, here we explicitly enable them with _GNU_SOURCE (which enables
+also a lot of other things).
+--- a/src/libstrongswan/utils.c
++++ b/src/libstrongswan/utils.c
+@@ -14,6 +14,7 @@
+  * for more details.
+  */
++#define _GNU_SOURCE
+ #include "utils.h"
+ #include <sys/stat.h>