summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sade
diff options
context:
space:
mode:
authormurray <murray@FreeBSD.org>2002-04-07 10:27:24 +0000
committermurray <murray@FreeBSD.org>2002-04-07 10:27:24 +0000
commit14aed863caf36b58efa80d9b6579d2c188b0b208 (patch)
treed3006cdd2b2572d4e40a6043210f04b636849841 /usr.sbin/sade
parentf74fcb3febdf36b7f78d56fe363b3919bd6e1aa9 (diff)
downloadFreeBSD-src-14aed863caf36b58efa80d9b6579d2c188b0b208.zip
FreeBSD-src-14aed863caf36b58efa80d9b6579d2c188b0b208.tar.gz
GCC >= 3 and C99 handle zero-length arrays differently than older
versions of GCC. With this change, sysinstall compiles and works fine with GCC 3.1 or 2.95.
Diffstat (limited to 'usr.sbin/sade')
-rw-r--r--usr.sbin/sade/sade.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/usr.sbin/sade/sade.h b/usr.sbin/sade/sade.h
index a0b26a5..6858500 100644
--- a/usr.sbin/sade/sade.h
+++ b/usr.sbin/sade/sade.h
@@ -214,7 +214,13 @@ typedef struct _dmenu {
char *prompt; /* Our prompt */
char *helpline; /* Line of help at bottom */
char *helpfile; /* Help file for "F1" */
+#if (__STDC_VERSION__ >= 199901L) || (__GNUC__ >= 3)
+ dialogMenuItem items[]; /* Array of menu items */
+#elif __GNUC__
dialogMenuItem items[0]; /* Array of menu items */
+#else
+#error "Create hack for C89 and K&R compilers."
+#endif
} DMenu;
/* An rc.conf variable */
OpenPOWER on IntegriCloud