]> granicus.if.org Git - apache/commitdiff
Added APR_HAS_SHARED_MEMORY to a section of code where it was
authorBradley Nicholes <bnicholes@apache.org>
Mon, 14 Jan 2002 22:36:03 +0000 (22:36 +0000)
committerBradley Nicholes <bnicholes@apache.org>
Mon, 14 Jan 2002 22:36:03 +0000 (22:36 +0000)
missing, for those of us that don't have shared memory support.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92854 13f79535-47bb-0310-9956-ffa450edef68

server/scoreboard.c

index d196e56403871c4cb9915e3adae20385a4a56842..1365dfccce081b5db1dd3b83536cd9699715023b 100644 (file)
@@ -230,12 +230,15 @@ apr_status_t ap_cleanup_scoreboard(void *d) {
 void ap_create_scoreboard(apr_pool_t *p, ap_scoreboard_e sb_type)
 {
     int running_gen = 0;
+#if APR_HAS_SHARED_MEMORY
     apr_status_t rv;
+#endif
 
     if (ap_scoreboard_image)
        running_gen = ap_scoreboard_image->global->running_generation;
     if (ap_scoreboard_image == NULL) {
         ap_calc_scoreboard_size();
+#if APR_HAS_SHARED_MEMORY
         if (sb_type == SB_SHARED) {
             void *sb_shared;
             rv = open_scoreboard(p);
@@ -253,7 +256,9 @@ void ap_create_scoreboard(apr_pool_t *p, ap_scoreboard_e sb_type)
             }
             ap_init_scoreboard(sb_shared);
         }
-        else {
+        else 
+#endif
+        {
             /* A simple malloc will suffice */
             void *sb_mem = calloc(1, scoreboard_size);
             if (sb_mem == NULL) {