mirror of
https://github.com/samba-team/samba.git
synced 2025-03-27 22:50:26 +03:00
waf: Fix NFS quota support with libtirpc
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13238 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Jan 22 17:26:52 CET 2018 on sn-devel-144
This commit is contained in:
parent
87f105d76c
commit
39a6ea766d
@ -70,7 +70,7 @@ def configure(conf):
|
||||
conf.SET_TARGET_TYPE('tirpc', 'EMPTY')
|
||||
conf.CHECK_HEADERS('rpc/rpc.h rpc/nettype.h')
|
||||
if not conf.CONFIG_SET('HAVE_RPC_RPC_H'):
|
||||
if conf.CHECK_CFG(package='libtirpc', args='--cflags',
|
||||
if conf.CHECK_CFG(package='libtirpc', args='--cflags --libs',
|
||||
msg='Checking for libtirpc headers',
|
||||
uselib_store='TIRPC'):
|
||||
conf.CHECK_HEADERS('rpc/rpc.h rpc/nettype.h', lib='tirpc', together=True)
|
||||
|
@ -36,13 +36,22 @@
|
||||
* This is based on the FreeBSD / SUNOS5 section of quotas.c
|
||||
*/
|
||||
|
||||
/* <rpc/xdr.h> uses TRUE and FALSE */
|
||||
#ifdef TRUE
|
||||
#undef TRUE
|
||||
#endif
|
||||
|
||||
#ifdef FALSE
|
||||
#undef FALSE
|
||||
#endif
|
||||
|
||||
#include <rpc/rpc.h>
|
||||
#include <rpc/types.h>
|
||||
#include <rpc/xdr.h>
|
||||
#include <rpcsvc/rquota.h>
|
||||
#ifdef HAVE_RPC_NETTYPE_H
|
||||
#include <rpc/nettype.h>
|
||||
#endif
|
||||
#include <rpc/xdr.h>
|
||||
|
||||
#ifndef RQ_PATHLEN
|
||||
#define RQ_PATHLEN 1024
|
||||
|
@ -27,6 +27,15 @@
|
||||
#define DBGC_CLASS DBGC_VFS
|
||||
|
||||
#ifdef HAVE_RPC_XDR_H
|
||||
/* <rpc/xdr.h> uses TRUE and FALSE */
|
||||
#ifdef TRUE
|
||||
#undef TRUE
|
||||
#endif
|
||||
|
||||
#ifdef FALSE
|
||||
#undef FALSE
|
||||
#endif
|
||||
|
||||
#include <rpc/xdr.h>
|
||||
#include "nfs41acl.h"
|
||||
#include "nfs4acl_xattr_xdr.h"
|
||||
|
@ -1446,10 +1446,22 @@ main() {
|
||||
conf.CHECK_STRUCTURE_MEMBER('struct dqblk', 'dqb_curbytes', define='HAVE_STRUCT_DQBLK_DQB_CURBYTES',
|
||||
headers='sys/quota.h')
|
||||
if conf.CHECK_HEADERS('rpcsvc/rquota.h', lib='tirpc'):
|
||||
conf.DEFINE('HAVE_NFS_QUOTAS', '1')
|
||||
# Optional structure member
|
||||
conf.CHECK_STRUCTURE_MEMBER('struct getquota_rslt', 'getquota_rslt_u',
|
||||
define='HAVE_GETQUOTA_RSLT_GETQUOTA_RSLT_U',
|
||||
headers='rpcsvc/rquota.h')
|
||||
headers='rpcsvc/rquota.h',
|
||||
lib='tirpc')
|
||||
|
||||
# Required fucntion for NFS quote support
|
||||
conf.CHECK_CODE('''
|
||||
clnt_create("", RQUOTAPROG, RQUOTAVERS, "udp");
|
||||
''',
|
||||
headers="rpc/rpc.h rpc/types.h rpcsvc/rquota.h rpc/nettype.h rpc/xdr.h",
|
||||
define='HAVE_NFS_QUOTAS',
|
||||
msg='checking for clnt_create()',
|
||||
execute=True,
|
||||
local_include=False,
|
||||
lib='tirpc')
|
||||
|
||||
if (host_os.rfind('linux') > -1):
|
||||
conf.DEFINE('HAVE_QUOTACTL_LINUX', '1')
|
||||
@ -1476,16 +1488,6 @@ main() {
|
||||
execute=True,
|
||||
addmain=False)
|
||||
|
||||
conf.CHECK_CODE('''
|
||||
clnt_create("", RQUOTAPROG, RQUOTAVERS, "udp");
|
||||
''',
|
||||
headers="rpc/rpc.h rpc/types.h rpcsvc/rquota.h rpc/nettype.h rpc/xdr.h",
|
||||
define='HAVE_NFS_QUOTAS',
|
||||
msg='for NFS QUOTAS',
|
||||
execute=True,
|
||||
local_include=False,
|
||||
lib='tirpc')
|
||||
|
||||
if conf.CONFIG_SET('HAVE_QUOTACTL_LINUX') or \
|
||||
conf.CONFIG_SET('HAVE_QUOTACTL_4A') or \
|
||||
conf.CONFIG_SET('HAVE_QUOTACTL_4B') or \
|
||||
|
@ -594,7 +594,7 @@ bld.SAMBA3_SUBSYSTEM('sysquotas',
|
||||
lib/sysquotas_nfs.c
|
||||
''',
|
||||
allow_warnings=True,
|
||||
deps='samba3-util samba-util')
|
||||
deps='samba3-util samba-util tirpc')
|
||||
|
||||
NOTIFY_SOURCES=''
|
||||
NOTIFY_DEPS=''
|
||||
|
Loading…
x
Reference in New Issue
Block a user