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.
This commit is contained in:
parent
f74fcb3feb
commit
14aed863ca
@ -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 */
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user