Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Dec 2018 21:16:04 +0000 (UTC)
From:      Alex Richardson <arichardson@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r342101 - head/lib/libnv
Message-ID:  <201812142116.wBELG4Tn008769@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: arichardson
Date: Fri Dec 14 21:16:04 2018
New Revision: 342101
URL: https://svnweb.freebsd.org/changeset/base/342101

Log:
  Allow bootstrapping libnv on macOS and Linux
  
  MacOS/Linux do not define struct cmsgcred but we need to bootstrap libnv
  when building on non-FreeBSD systems. Since they are not used during
  bootstrap we can just omit these two functions there.
  
  Reviewed By:	emaste
  Differential Revision: https://reviews.freebsd.org/D18472

Modified:
  head/lib/libnv/msgio.c

Modified: head/lib/libnv/msgio.c
==============================================================================
--- head/lib/libnv/msgio.c	Fri Dec 14 21:07:12 2018	(r342100)
+++ head/lib/libnv/msgio.c	Fri Dec 14 21:16:04 2018	(r342101)
@@ -157,6 +157,14 @@ msg_send(int sock, const struct msghdr *msg)
 	return (0);
 }
 
+/*
+ * MacOS/Linux do not define struct cmsgcred but we need to bootstrap libnv
+ * when building on non-FreeBSD systems. Since they are not used during
+ * bootstrap we can just omit these two functions there.
+ */
+#ifndef __FreeBSD__
+#warning "cred_send() not supported on non-FreeBSD systems"
+#else
 int
 cred_send(int sock)
 {
@@ -232,6 +240,7 @@ cred_recv(int sock, struct cmsgcred *cred)
 
 	return (0);
 }
+#endif
 
 static int
 fd_package_send(int sock, const int *fds, size_t nfds)



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