Module Name: src
Committed By: tron
Date: Thu Apr 16 13:52:52 UTC 2009
Modified Files:
src/usr.bin/gencat: gencat.c
Log Message:
Fix build problem on big endian ports where ntohl() doesn't convert the
argument to "uint32_t" automatically.
To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/usr.bin/gencat/gencat.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/gencat/gencat.c
diff -u src/usr.bin/gencat/gencat.c:1.28 src/usr.bin/gencat/gencat.c:1.29
--- src/usr.bin/gencat/gencat.c:1.28 Sun Apr 12 10:25:35 2009
+++ src/usr.bin/gencat/gencat.c Thu Apr 16 13:52:52 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: gencat.c,v 1.28 2009/04/12 10:25:35 lukem Exp $ */
+/* $NetBSD: gencat.c,v 1.29 2009/04/16 13:52:52 tron Exp $ */
/*
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: gencat.c,v 1.28 2009/04/12 10:25:35 lukem Exp $");
+__RCSID("$NetBSD: gencat.c,v 1.29 2009/04/16 13:52:52 tron Exp $");
#endif
/***********************************************************
@@ -556,7 +556,7 @@
else
errx(1, CORRUPT);
}
- if (ntohl(cat_hdr.__magic) != _NLS_MAGIC)
+ if (ntohl((uint32_t)cat_hdr.__magic) != _NLS_MAGIC)
errx(1, "%s: bad magic number (%#x)", CORRUPT, cat_hdr.__magic);
cat_hdr.__mem = ntohl(cat_hdr.__mem);