]> git.ozlabs.org Git - petitboot/blobdiff - discover/yaboot-parser.c
configure: Use AC_GNU_SOURCE
[petitboot] / discover / yaboot-parser.c
index e52187fff6b61203325e13019fa472ca95c9ad0f..41f43eb614186926ad38dd8bebe1f3b2f6f958d8 100644 (file)
@@ -1,4 +1,6 @@
-#define _GNU_SOURCE
+#if defined(HAVE_CONFIG_H)
+#include "config.h"
+#endif
 
 #include <assert.h>
 #include <stdlib.h>
@@ -102,7 +104,8 @@ static void yaboot_finish(struct conf_context *conf)
        const char *default_label;
        struct boot_option *opt;
 
-       assert(state->opt);
+       if (!state->opt)
+               return;
 
        opt = state->opt->option;
        assert(opt);