Skip to content

Commit e9b6ea1

Browse files
committedNov 23, 2024·
meson: Check for SunRPC function quota_open(), GitHub #1225
1 parent c6b7293 commit e9b6ea1

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed
 

‎etc/afpd/meson.build

+5-1
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,13 @@ endif
7373

7474
if have_quota
7575
afpd_sources += [
76-
'nfsquota.c',
7776
'quota.c',
7877
]
78+
if not have_libquota
79+
afpd_sources += [
80+
'nfsquota.c',
81+
]
82+
endif
7983
afpd_external_deps += quota_deps
8084
endif
8185

‎etc/afpd/quota.c

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include <atalk/util.h>
3333

3434
#include "auth.h"
35+
#include "directory.h"
3536
#include "volume.h"
3637
#include "unix.h"
3738

‎meson.build

+3-1
Original file line numberDiff line numberDiff line change
@@ -971,6 +971,7 @@ tirpc = dependency('libtirpc', required: false)
971971

972972
quota_deps = []
973973
quota_provider = ''
974+
have_libquota = false
974975

975976
rpc_headers = [
976977
'rpc/rpc.h',
@@ -1017,7 +1018,8 @@ else
10171018
if have_quota
10181019
quota_deps += rpcsvc
10191020
quota_provider += 'SunRPC'
1020-
if quota.found() and cc.has_function('getfsquota', dependencies: [quota, prop, rpcsvc])
1021+
if quota.found() and cc.has_function('quota_open', dependencies: [quota, prop, rpcsvc])
1022+
have_libquota = true
10211023
quota_deps += [quota, prop]
10221024
cdata.set('HAVE_LIBQUOTA', 1)
10231025
endif

‎test/afpd/meson.build

+5-1
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,13 @@ endif
5656

5757
if have_quota
5858
test_sources += [
59-
meson.project_source_root() / 'etc/afpd/nfsquota.c',
6059
meson.project_source_root() / 'etc/afpd/quota.c',
6160
]
61+
if not have_libquota
62+
test_sources += [
63+
meson.project_source_root() / 'etc/afpd/nfsquota.c',
64+
]
65+
endif
6266
test_external_deps += quota_deps
6367
endif
6468

0 commit comments

Comments
 (0)