Description: Rename debug_level to smb_debug_level to avoid variable name conflicts between NSS libraries and applications Author: Chow Loong Jin Bug-Ubuntu: https://bugs.launchpad.net/bugs/529714 Bug: https://bugzilla.samba.org/show_bug.cgi?id=8104 Index: samba/source3/include/debug.h =================================================================== --- samba.orig/source3/include/debug.h 2011-04-26 21:46:14.852807862 +0800 +++ samba/source3/include/debug.h 2011-04-26 21:46:25.156066838 +0800 @@ -69,7 +69,8 @@ * still be through a macro still called DEBUGLEVEL. This cannot be done now * because some references would expand incorrectly. */ -#define DEBUGLEVEL *debug_level +#define PDEBUGLEVEL smb_debug_level +#define DEBUGLEVEL *PDEBUGLEVEL extern int DEBUGLEVEL; /* Index: samba/source3/lib/debug.c =================================================================== --- samba.orig/source3/lib/debug.c 2011-04-26 21:46:14.869474407 +0800 +++ samba/source3/lib/debug.c 2011-04-26 21:46:25.156066838 +0800 @@ -208,7 +208,7 @@ debug_num_classes = 0; - debug_level = DEBUGLEVEL_CLASS; + PDEBUGLEVEL = DEBUGLEVEL_CLASS; initialized = false; } @@ -342,7 +342,7 @@ /* Transfer the initial level from debug_all_class_hack */ DEBUGLEVEL_CLASS[ndx] = DEBUGLEVEL; } - debug_level = DEBUGLEVEL_CLASS; + PDEBUGLEVEL = DEBUGLEVEL_CLASS; new_ptr = DEBUGLEVEL_CLASS_ISSET; if (new_ptr == &debug_all_class_isset_hack) {