mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 05:17:59 +03:00
nss: fix build on freebsd
The conversion to drop gnulib in the previous patch:
commit 8242ce4f45
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: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
93c1d5fe7b
commit
9ce035e404
@ -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>
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user