diff --git a/libatalk/compat/Makefile.am b/libatalk/compat/Makefile.am index efb8d13a5b..62561b928c 100644 --- a/libatalk/compat/Makefile.am +++ b/libatalk/compat/Makefile.am @@ -2,10 +2,6 @@ noinst_LTLIBRARIES = libcompat.la -libcompat_la_CFLAGS = @QUOTA_CFLAGS@ -libcompat_la_LIBADD = @QUOTA_LIBS@ - libcompat_la_SOURCES = \ misc.c \ - rquota_xdr.c \ strlcpy.c diff --git a/libatalk/compat/meson.build b/libatalk/compat/meson.build index b12c83393c..e29b82ba1c 100644 --- a/libatalk/compat/meson.build +++ b/libatalk/compat/meson.build @@ -1,6 +1,5 @@ compat_sources = [ 'misc.c', - 'rquota_xdr.c', 'strlcpy.c', ] @@ -8,7 +7,5 @@ libcompat = static_library( 'compat', compat_sources, include_directories: root_includes, - dependencies: tirpc, - link_args: quota_link_args, install: false, ) diff --git a/libatalk/compat/rquota_xdr.c b/libatalk/compat/rquota_xdr.c deleted file mode 100644 index eb73c9754e..0000000000 --- a/libatalk/compat/rquota_xdr.c +++ /dev/null @@ -1,122 +0,0 @@ -/* - * - * taken from the quota-1.55 used on linux. here's the bsd copyright: - * - * Copyright (c) 1980, 1990 Regents of the University of California. All - * rights reserved. - * - * This code is derived from software contributed to Berkeley by Robert Elz at - * The University of Melbourne. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif /* HAVE_CONFIG_H */ - -#include /* to get __GNU_LIBRARY__ */ - -/* list of machines that don't have these functions: - solaris - linux libc5 -*/ -#if defined(NEED_RQUOTA) || defined(SOLARIS) || (defined(__GNU_LIBRARY__) && __GNU_LIBRARY__ < 6) - -#include -#include - -#ifndef u_int -#define u_int unsigned -#endif - -bool_t -xdr_getquota_args(xdrs, objp) - XDR *xdrs; - getquota_args *objp; -{ - if (!xdr_string(xdrs, &objp->gqa_pathp, RQ_PATHLEN)) { - return (FALSE); - } - if (!xdr_int(xdrs, &objp->gqa_uid)) { - return (FALSE); - } - return (TRUE); -} - - -bool_t -xdr_rquota(xdrs, objp) - XDR *xdrs; - rquota *objp; -{ - if (!xdr_int(xdrs, &objp->rq_bsize)) { - return (FALSE); - } - if (!xdr_bool(xdrs, &objp->rq_active)) { - return (FALSE); - } - if (!xdr_u_int(xdrs, &objp->rq_bhardlimit)) { - return (FALSE); - } - if (!xdr_u_int(xdrs, &objp->rq_bsoftlimit)) { - return (FALSE); - } - if (!xdr_u_int(xdrs, &objp->rq_curblocks)) { - return (FALSE); - } - if (!xdr_u_int(xdrs, &objp->rq_fhardlimit)) { - return (FALSE); - } - if (!xdr_u_int(xdrs, &objp->rq_fsoftlimit)) { - return (FALSE); - } - if (!xdr_u_int(xdrs, &objp->rq_curfiles)) { - return (FALSE); - } - if (!xdr_u_int(xdrs, &objp->rq_btimeleft)) { - return (FALSE); - } - if (!xdr_u_int(xdrs, &objp->rq_ftimeleft)) { - return (FALSE); - } - return (TRUE); -} - - - - -bool_t -xdr_gqr_status(xdrs, objp) - XDR *xdrs; - gqr_status *objp; -{ - if (!xdr_enum(xdrs, (enum_t *)objp)) { - return (FALSE); - } - return (TRUE); -} - - -bool_t -xdr_getquota_rslt(xdrs, objp) - XDR *xdrs; - getquota_rslt *objp; -{ - if (!xdr_gqr_status(xdrs, &objp->status)) { - return (FALSE); - } - switch (objp->status) { - case Q_OK: - if (!xdr_rquota(xdrs, &objp->getquota_rslt_u.gqr_rquota)) { - return (FALSE); - } - break; - case Q_NOQUOTA: - break; - case Q_EPERM: - break; - default: - return (FALSE); - } - return (TRUE); -} -#endif