s4: tests: Fix nss_tests build on Solaris.
authorTom Schulz <schulz@adi.com>
Wed, 16 Sep 2015 23:55:23 +0000 (16:55 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 17 Sep 2015 03:01:07 +0000 (05:01 +0200)
Too many arguments for Solaris getpwent_r() and getgrent_r().

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11508

Signed-off-by: Tom Schulz <schulz@adi.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <rb@sernet.de>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Sep 17 05:01:07 CEST 2015 on sn-devel-104

source4/torture/local/nss_tests.c

index 546d7eb2ace0b276983f2a4a3a53d74756af2c5e..e814dbafbddc1845ce6517dc28d4002a34912453 100644 (file)
@@ -349,7 +349,11 @@ static bool test_enum_r_passwd(struct torture_context *tctx,
        while (1) {
                torture_comment(tctx, "Testing getpwent_r\n");
 
+#ifdef SOLARIS_GETPWENT_R
+               ret = getpwent_r(&pwd, buffer, sizeof(buffer));
+#else /* SOLARIS_GETPWENT_R */
                ret = getpwent_r(&pwd, buffer, sizeof(buffer), &pwdp);
+#endif /* SOLARIS_GETPWENT_R */
                if (ret != 0) {
                        if (ret != ENOENT) {
                                torture_comment(tctx, "got %d return code\n", ret);
@@ -543,7 +547,11 @@ static bool test_enum_r_group(struct torture_context *tctx,
        while (1) {
                torture_comment(tctx, "Testing getgrent_r\n");
 
+#ifdef SOLARIS_GETGRENT_R
+               ret = getgrent_r(&grp, buffer, sizeof(buffer));
+#else /* SOLARIS_GETGRENT_R */
                ret = getgrent_r(&grp, buffer, sizeof(buffer), &grpp);
+#endif /* SOLARIS_GETGRENT_R */
                if (ret != 0) {
                        if (ret != ENOENT) {
                                torture_comment(tctx, "got %d return code\n", ret);