mirror of
https://github.com/apache/httpd.git
synced 2025-07-25 17:01:22 +00:00
Handle the gugz fix in APR 1.5.1 regarding duplicate
keys. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1542732 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@ -28,6 +28,8 @@
|
|||||||
#ifdef AP_NEED_SET_MUTEX_PERMS
|
#ifdef AP_NEED_SET_MUTEX_PERMS
|
||||||
#include "unixd.h"
|
#include "unixd.h"
|
||||||
#endif
|
#endif
|
||||||
|
#include "apr_version.h"
|
||||||
|
#include "apr_hash.h"
|
||||||
|
|
||||||
#if APR_HAVE_UNISTD_H
|
#if APR_HAVE_UNISTD_H
|
||||||
#include <unistd.h> /* for getpid() */
|
#include <unistd.h> /* for getpid() */
|
||||||
@ -95,7 +97,13 @@ static apr_status_t unixd_set_shm_perms(const char *fname)
|
|||||||
key_t shmkey;
|
key_t shmkey;
|
||||||
int shmid;
|
int shmid;
|
||||||
|
|
||||||
|
#if APR_VERSION_AT_LEAST(1,5,1)
|
||||||
|
apr_ssize_t slen = strlen(fname);
|
||||||
|
shmkey = ftok(fname,
|
||||||
|
(int)apr_hashfunc_default(fname, &slen));
|
||||||
|
#else
|
||||||
shmkey = ftok(fname, 1);
|
shmkey = ftok(fname, 1);
|
||||||
|
#endif
|
||||||
if (shmkey == (key_t)-1) {
|
if (shmkey == (key_t)-1) {
|
||||||
return errno;
|
return errno;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user