]> xenbits.xensource.com Git - libvirt.git/commitdiff
nss: Include stdio.h and define NULLSTR when debugging is enabled
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 9 Aug 2019 08:32:15 +0000 (10:32 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 9 Aug 2019 10:17:19 +0000 (12:17 +0200)
The NSS module has a compile time option which when enabled makes
ERROR() and DEBUG() print messages onto stderr. But now that the
module no longer links with libvirt, we need to include stdio.h
and define NULLSTR().

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
tools/nss/libvirt_nss.h

index 63e1bf0af56a6ea63b17bb3585d39067cdfd8242..ee6c971d3dd7959cbf25e0da173a4f8ec070ed8d 100644 (file)
@@ -33,6 +33,8 @@
 
 #if 0
 # include <errno.h>
+# include <stdio.h>
+# define NULLSTR(s) ((s) ? (s) : "<null>")
 # define ERROR(...) \
 do { \
     char ebuf[1024]; \