* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef TEST_SYSCALL_NAME
-# define TEST_SYSCALL_NAME accept
-#endif
+#include "tests.h"
+
+#include <unistd.h>
+
+#include <asm/unistd.h>
+
+#if defined __NR_accept
+
+# ifndef TEST_SYSCALL_NAME
+# define TEST_SYSCALL_NAME do_accept
+
+# ifndef TEST_SYSCALL_STR
+# define TEST_SYSCALL_STR "accept"
+# endif
+
+int do_accept(int sockfd, void *addr, void *addrlen)
+{
+ return syscall(__NR_accept, sockfd, addr, addrlen);
+}
+# endif /* !TEST_SYSCALL_NAME */
+
+#else /* !__NR_accept */
+
+# ifndef TEST_SYSCALL_NAME
+# define TEST_SYSCALL_NAME accept
+# endif
+
+#endif /* __NR_accept */
#define TEST_SYSCALL_PREPARE connect_un()
static void connect_un(void);
# error TEST_SYSCALL_NAME must be defined
#endif
-#define TEST_SYSCALL_STR STRINGIFY_VAL(TEST_SYSCALL_NAME)
+#ifndef TEST_SYSCALL_STR
+# define TEST_SYSCALL_STR STRINGIFY_VAL(TEST_SYSCALL_NAME)
+#endif
#define TEST_SOCKET TEST_SYSCALL_STR ".socket"
#ifdef TEST_SYSCALL_PREPARE