From: Todd C. Miller Date: Fri, 27 Feb 2015 14:10:20 +0000 (-0700) Subject: Define YYDEBUG to 0 if not already defined so we can protect use X-Git-Tag: SUDO_1_8_13^2~26 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=233783511d473d63850303eefa0ac5ba51869daf;p=sudo Define YYDEBUG to 0 if not already defined so we can protect use of sudoersdebug with "#if YYDEBUG" like the generated parser does. From David Michael. --- diff --git a/plugins/sudoers/testsudoers.c b/plugins/sudoers/testsudoers.c index 2b6a5f26b..3006d5ae6 100644 --- a/plugins/sudoers/testsudoers.c +++ b/plugins/sudoers/testsudoers.c @@ -67,6 +67,10 @@ # include "compat/fnmatch.h" #endif /* HAVE_FNMATCH */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif + /* * Function Prototypes */ @@ -106,7 +110,7 @@ static char *runas_group, *runas_user; #if defined(SUDO_DEVEL) && defined(__OpenBSD__) extern char *malloc_options; #endif -#ifdef YYDEBUG +#if YYDEBUG extern int sudoersdebug; #endif @@ -127,7 +131,7 @@ main(int argc, char *argv[]) #if defined(SUDO_DEVEL) && defined(__OpenBSD__) malloc_options = "AFGJPR"; #endif -#ifdef YYDEBUG +#if YYDEBUG sudoersdebug = 1; #endif