summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psxhdrs/unistd/setgroups.c
diff options
context:
space:
mode:
authorChristian Mauderer <Christian.Mauderer@embedded-brains.de>2016-05-02 14:49:35 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-06-28 13:01:37 +0200
commit187a0744042960f4306d691ebfef3c3e3cdd3470 (patch)
tree2b272e9144f7d6af2d6f09d1d4ad0b32f3e5b706 /testsuites/psxtests/psxhdrs/unistd/setgroups.c
parentscore: Change Priority_Control to 64-bit (diff)
downloadrtems-187a0744042960f4306d691ebfef3c3e3cdd3470.tar.bz2
libcsupport: Add dummy for setgroups().
The dummy for setgroups() allows applications using it to build (for example civetweb webserver).
Diffstat (limited to '')
-rw-r--r--testsuites/psxtests/psxhdrs/unistd/setgroups.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/testsuites/psxtests/psxhdrs/unistd/setgroups.c b/testsuites/psxtests/psxhdrs/unistd/setgroups.c
new file mode 100644
index 0000000000..e8b87ab54e
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/unistd/setgroups.c
@@ -0,0 +1,33 @@
+/*
+ * This test file is used to verify that the header files associated with
+ * invoking this function are correct.
+ *
+ * COPYRIGHT (c) 1989-2009.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <sys/types.h>
+#include <unistd.h>
+
+int test( void );
+
+int test( void )
+{
+ gid_t grouplist[ 20 ];
+ int gidsetsize;
+ int result;
+
+ gidsetsize = sizeof(grouplist)/sizeof(grouplist[0]);
+
+ result = setgroups( gidsetsize, grouplist );
+
+ return result;
+}