Author: Vignesh R <vignesh.r@timesys.com>
Date: Thu, 24 Jun 2021 17:19:45 +0530


toolchain/include/linux/quota.h:175:6: error: conflicting types for 'quotactl'
 long quotactl __P ((unsigned int, const char *, int, caddr_t));
      ^
In file included from pam_setquota.c:12:0:
toolchain/include/sys/quota.h:220:12: note: previous declaration of 'quotactl' was here
 extern int quotactl (int __cmd, const char *__special, int __id,
            ^

quotactl removed from 3.1 kernel version
https://github.com/torvalds/linux/commit/d12dc256547cec4fe62dad6e94252dced4ee2d58

---
 modules/pam_setquota/pam_setquota.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/pam_setquota/pam_setquota.c b/modules/pam_setquota/pam_setquota.c
index ec45baa..92b4527 100644
--- a/modules/pam_setquota/pam_setquota.c
+++ b/modules/pam_setquota/pam_setquota.c
@@ -9,7 +9,10 @@
 */
 
 #include <sys/types.h>
+#include <linux/version.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)
 #include <sys/quota.h>
+#endif
 #include <linux/quota.h>
 #include <pwd.h>
 #include <syslog.h>
-- 
2.7.4

