diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-04-06 11:50:33 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-04-06 11:50:33 +0800 |
commit | 4fd81cdbd5ddd4b31788deb95afaac327405637a (patch) | |
tree | 7bd00bc748a1a722bbfe5753474dd13bef9b87f0 | |
parent | 916266c02989e9f41dfa561ca39ec3be3f994fb1 (diff) | |
download | pttbbs-4fd81cdbd5ddd4b31788deb95afaac327405637a.tar pttbbs-4fd81cdbd5ddd4b31788deb95afaac327405637a.tar.gz pttbbs-4fd81cdbd5ddd4b31788deb95afaac327405637a.tar.bz2 pttbbs-4fd81cdbd5ddd4b31788deb95afaac327405637a.tar.lz pttbbs-4fd81cdbd5ddd4b31788deb95afaac327405637a.tar.xz pttbbs-4fd81cdbd5ddd4b31788deb95afaac327405637a.tar.zst pttbbs-4fd81cdbd5ddd4b31788deb95afaac327405637a.zip |
fix bug
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@87 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | util/shmctl.c | 4 |
1 files changed, 3 insertions, 1 deletions
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 <errno.h> 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; } |