170-non_fatal_include.patch 576 B

123456789101112131415161718192021
  1. Index: hotplug2-201/parser/parser.c
  2. ===================================================================
  3. --- hotplug2-201.orig/parser/parser.c 2009-12-09 19:44:13.000000000 +0100
  4. +++ hotplug2-201/parser/parser.c 2011-02-08 18:06:44.681213713 +0100
  5. @@ -1,5 +1,7 @@
  6. #include "parser.h"
  7. +#include <errno.h>
  8. +
  9. /*
  10. * Grammar:
  11. * input => directive // TOKEN_ROOTKW
  12. @@ -578,7 +580,7 @@
  13. ctx.lexer.fp = fopen(filename, "r");
  14. if (ctx.lexer.fp == NULL) {
  15. parser_clear(&ctx);
  16. - return -1;
  17. + return (errno == ENOENT) ? 0 : -1;
  18. }
  19. ctx.lexer.filename = strdup(filename);