diff options
Diffstat (limited to 'usr.bin/usbhidaction')
-rw-r--r-- | usr.bin/usbhidaction/usbhidaction.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/usbhidaction/usbhidaction.c b/usr.bin/usbhidaction/usbhidaction.c index fc78d4e..142e3cc 100644 --- a/usr.bin/usbhidaction/usbhidaction.c +++ b/usr.bin/usbhidaction/usbhidaction.c @@ -165,7 +165,8 @@ main(int argc, char **argv) if (demon) { fp = open(pidfile, O_WRONLY|O_CREAT, S_IRUSR|S_IRGRP|S_IROTH); if (fp >= 0) { - sz1 = snprintf(buf, sizeof buf, "%d\n", getpid()); + sz1 = snprintf(buf, sizeof buf, "%ld\n", + (long)getpid()); if (sz1 > sizeof buf) sz1 = sizeof buf; write(fp, buf, sz1); |