LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File apc-module-deps.patch of Package php5-APC (Project spins:invis)

--- php_apc.c.orig
+++ php_apc.c
@@ -1678,10 +1678,29 @@ zend_function_entry apc_functions[] = {
 };
 /* }}} */
 
+/* {{{ apc dependencies */
+#if ZEND_MODULE_API_NO >= 20050922
+static const zend_module_dep apc_module_deps[] = {
+	ZEND_MOD_REQUIRED("standard")
+#if HAVE_PCRE || HAVE_BUNDLED_PCRE
+	ZEND_MOD_REQUIRED("pcre")
+#endif
+	ZEND_MOD_CONFLICTS("XCache")                                                                                                                                                                                                                      
+	ZEND_MOD_CONFLICTS("eAccelerator")                                                                                                                                                                                                             
+	ZEND_MOD_CONFLICTS("Turck MMCache")
+	{NULL, NULL, NULL}
+};
+#endif
+
 /* {{{ module definition structure */
 
 zend_module_entry apc_module_entry = {
+#if ZEND_MODULE_API_NO >= 20050922
+    STANDARD_MODULE_HEADER_EX, NULL,
+    apc_module_deps,
+#elif ZEND_MODULE_API_NO >= 20010901
     STANDARD_MODULE_HEADER,
+#endif
     "apc",
     apc_functions,
     PHP_MINIT(apc),
--- apc_mmap.c.orig
+++ apc_mmap.c
@@ -124,7 +124,7 @@ apc_segment_t apc_mmap(char *file_mask,
 
     segment.shmaddr = (void *)mmap(NULL, size, PROT_READ | PROT_WRITE, flags, fd, 0);
     segment.size = size;
-
+    madvise(segment.shmaddr, size, MADV_MERGEABLE);
 #ifdef APC_MEMPROTECT
     if(remap) {
         segment.roaddr = (void *)mmap(NULL, size, PROT_READ, flags, fd, 0);