Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Jan 2016 20:52:36 +0000 (UTC)
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r293361 - head/sys/sys
Message-ID:  <201601072052.u07KqaCi041281@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601072052.u07KqaCi041281>