]> granicus.if.org Git - apache/commitdiff
avoid a relatively ugly code dup
authorJim Jagielski <jim@apache.org>
Fri, 22 May 2009 16:44:15 +0000 (16:44 +0000)
committerJim Jagielski <jim@apache.org>
Fri, 22 May 2009 16:44:15 +0000 (16:44 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@777614 13f79535-47bb-0310-9956-ffa450edef68

modules/slotmem/mod_slotmem_shm.c

index 40278eb31476178680751b0811d0184e6d0671d4..dee8bc6c1cb6eadf1e8f45226f03557d8c8814f1 100644 (file)
@@ -84,13 +84,11 @@ static apr_status_t unixd_set_shm_perms(const char *fname)
     if ((shmid = shmget(shmkey, 0, SHM_R | SHM_W)) == -1) {
         return errno;
     }
-#if MODULE_MAGIC_NUMBER_MAJOR > 20081212
+#if MODULE_MAGIC_NUMBER_MAJOR <= 20081212
+#define ap_unixd_config unixd_config
+#endif
     shmbuf.shm_perm.uid  = ap_unixd_config.user_id;
     shmbuf.shm_perm.gid  = ap_unixd_config.group_id;
-#else
-    shmbuf.shm_perm.uid  = unixd_config.user_id;
-    shmbuf.shm_perm.gid  = unixd_config.group_id;
-#endif
     shmbuf.shm_perm.mode = 0600;
     if (shmctl(shmid, IPC_SET, &shmbuf) == -1) {
         return errno;