* file.c (print_dirfd): Use int for file descriptor, not a long.
* process.c (printwaitn): Use int for PID, not a long.
diff --git a/file.c b/file.c
index a8401cf..080e10b 100644
--- a/file.c
+++ b/file.c
@@ -327,13 +327,16 @@
 # define AT_FDCWD                -100
 #endif
 
+/* The fd is an "int", so when decoding x86 on x86_64, we need to force sign
+ * extension to get the right value.  We do this by declaring fd as int here.
+ */
 static void
-print_dirfd(long fd)
+print_dirfd(int fd)
 {
 	if (fd == AT_FDCWD)
 		tprintf("AT_FDCWD, ");
 	else
-		tprintf("%ld, ", fd);
+		tprintf("%d, ", fd);
 }
 #endif