summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--util/shmctl.c4
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;
}