From 4fd81cdbd5ddd4b31788deb95afaac327405637a Mon Sep 17 00:00:00 2001 From: in2 Date: Sat, 6 Apr 2002 03:50:33 +0000 Subject: fix bug git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@87 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- util/shmctl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'util') diff --git a/util/shmctl.c b/util/shmctl.c index 6a0ea764..13b97d14 100644 --- a/util/shmctl.c +++ b/util/shmctl.c @@ -10,6 +10,7 @@ #include "config.h" #include "pttstruct.h" #include "util.h" +#include extern struct utmpfile_t *utmpshm; @@ -221,8 +222,9 @@ int main(int argc, char **argv) if( argc >= 2 ){ /* shmctl shouldn't create shm itself */ - int shmid = shmget(UHASH_KEY, sizeof(*utmpshm), 0); + int shmid = shmget(UHASH_KEY, sizeof(uhash_t), 0); if( shmid < 0 ){ + printf("%d\n", errno); perror("attach utmpshm"); return 1; } -- cgit v1.2.3