From 0b516de46e0e739e3d8e5969460fa15cd323eb6e Mon Sep 17 00:00:00 2001 From: mhei Date: Fri, 29 Jul 2011 21:59:03 +0000 Subject: [PATCH] [packages] php5: fix compile with older gcc This fix work around the membar_producer link error which can be seen on backfire for brcm-2.4. git-svn-id: svn://svn.openwrt.org/openwrt/packages@27834 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../patches/101-fix_membar_producer_link_error_gcc3x.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 lang/php5/patches/101-fix_membar_producer_link_error_gcc3x.patch diff --git a/lang/php5/patches/101-fix_membar_producer_link_error_gcc3x.patch b/lang/php5/patches/101-fix_membar_producer_link_error_gcc3x.patch new file mode 100644 index 000000000..b3f677f1a --- /dev/null +++ b/lang/php5/patches/101-fix_membar_producer_link_error_gcc3x.patch @@ -0,0 +1,11 @@ +--- a/ext/standard/php_crypt_r.c ++++ b/ext/standard/php_crypt_r.c +@@ -96,6 +96,8 @@ void _crypt_extended_init_r(void) + InterlockedIncrement(&initialized); + #elif (defined(__GNUC__) && (__GNUC__ >= 4 && __GNUC_MINOR__ >= 1)) + __sync_fetch_and_add(&initialized, 1); ++#elif (defined(__GNUC__) && (__GNUC__ == 3)) ++ initialized = 1; + #elif defined(HAVE_ATOMIC_H) /* Solaris 10 defines atomic API within */ + membar_producer(); + atomic_add_int(&initialized, 1); -- 2.11.0