Skip to content

Commit 5e41115

Browse files
committed
Ugly hack to make this compile without warnings on alpha.
1 parent 83c227e commit 5e41115

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

usr.sbin/tcpdump/interface.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: interface.h,v 1.3 1997/10/03 19:54:32 christos Exp $ */
1+
/* $NetBSD: interface.h,v 1.4 1997/10/13 20:45:40 cjs Exp $ */
22

33
/*
44
* Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
@@ -122,9 +122,19 @@ extern int packettype; /* as specified by -T */
122122
#endif
123123
#endif
124124

125+
/*
126+
* XXX This is a really ugly hack, but the preprocessor simply doesn't
127+
* know whether it's running on a 32- or 64-bit machine.
128+
*/
129+
#ifdef __alpha__
130+
#define INT64_FORMAT "%ld"
131+
#define U_INT64_FORMAT "%lu"
132+
#define HEX_INT64_FORMAT "%lx"
133+
#else
125134
#define INT64_FORMAT "%qd"
126135
#define U_INT64_FORMAT "%qu"
127136
#define HEX_INT64_FORMAT "%qx"
137+
#endif
128138

129139
extern char *program_name; /* used to generate self-identifying messages */
130140

0 commit comments

Comments
 (0)