提交 9ce035e4 编写于 作者: D Daniel P. Berrangé

nss: fix build on freebsd

The conversion to drop gnulib in the previous patch:

  commit 8242ce4f
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   Thu Aug 8 10:23:26 2019 +0100

    tools: avoid accidentally using files from gnulib

Missed a few conversions needed for FreeBSD. In particular
netdb.h doesn't pull in sys/socket.h or netinet/in.h
Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 93c1d5fe
......@@ -26,7 +26,6 @@
#include "libvirt_nss.h"
#include <netinet/in.h>
#include <resolv.h>
#include <sys/types.h>
#include <dirent.h>
......@@ -541,7 +540,9 @@ aiforaf(const char *name, int af, struct addrinfo *pai, struct addrinfo **aip)
}
int
_nss_compat_getaddrinfo(void *retval, void *mdata ATTRIBUTE_UNUSED, va_list ap)
_nss_compat_getaddrinfo(void *retval,
void *mdata __attribute__((unused)),
va_list ap)
{
struct addrinfo sentinel, *cur, *ai;
const char *name;
......@@ -567,7 +568,9 @@ _nss_compat_getaddrinfo(void *retval, void *mdata ATTRIBUTE_UNUSED, va_list ap)
}
int
_nss_compat_gethostbyname2_r(void *retval, void *mdata ATTRIBUTE_UNUSED, va_list ap)
_nss_compat_gethostbyname2_r(void *retval,
void *mdata __attribute__((unused)),
va_list ap)
{
int ret;
......@@ -594,7 +597,8 @@ _nss_compat_gethostbyname2_r(void *retval, void *mdata ATTRIBUTE_UNUSED, va_list
}
ns_mtab*
nss_module_register(const char *name ATTRIBUTE_UNUSED, unsigned int *size,
nss_module_register(const char *name __attribute__((unused)),
unsigned int *size,
nss_module_unregister_fn *unregister)
{
*size = sizeof(methods) / sizeof(methods[0]);
......
......@@ -26,6 +26,8 @@
#pragma once
#include <nss.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册