From: Michael Heimpold Date: Fri, 29 Jul 2011 21:59:03 +0000 (+0000) Subject: [packages] php5: fix compile with older gcc X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=8e09625dee42db8c14d1d4b841cf69e14d41bc01;p=openwrt%2Fsvn-archive%2Farchive.git [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. SVN-Revision: 27834 --- 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 0000000000..b3f677f1a0 --- /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);