Author: bdrewery
Date: Thu Jan  7 20:52:35 2016
New Revision: 293361
URL: https://svnweb.freebsd.org/changeset/base/293361

Log:
  Allow libnv to be built externally using GCC.
  
  GCC does not define _VA_LIST_DECLARED.  It defines _VA_LIST_ and others.
  This was causing the prototype to not be defined and leading to an error
  later due to using nvlist_add_stringv(3) without a prototype in
  nvlist_add_stringf(3).
  
  This uses the same check as other va_list prototypes in the original
  change in r279438.

Modified:
  head/sys/sys/nv.h

Modified: head/sys/sys/nv.h
==============================================================================
--- head/sys/sys/nv.h   Thu Jan  7 20:50:03 2016        (r293360)
+++ head/sys/sys/nv.h   Thu Jan  7 20:52:35 2016        (r293361)
@@ -146,7 +146,7 @@ void nvlist_add_bool(nvlist_t *nvl, cons
 void nvlist_add_number(nvlist_t *nvl, const char *name, uint64_t value);
 void nvlist_add_string(nvlist_t *nvl, const char *name, const char *value);
 void nvlist_add_stringf(nvlist_t *nvl, const char *name, const char *valuefmt, 
...) __printflike(3, 4);
-#ifdef _VA_LIST_DECLARED
+#if !defined(_KERNEL) || defined(_VA_LIST_DECLARED)
 void nvlist_add_stringv(nvlist_t *nvl, const char *name, const char *valuefmt, 
va_list valueap) __printflike(3, 0);
 #endif
 void nvlist_add_nvlist(nvlist_t *nvl, const char *name, const nvlist_t *value);
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to