diff options
Diffstat (limited to 'elf/tst-stackguard1.c')
-rw-r--r-- | elf/tst-stackguard1.c | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/elf/tst-stackguard1.c b/elf/tst-stackguard1.c index a3f967b253..78e33c7083 100644 --- a/elf/tst-stackguard1.c +++ b/elf/tst-stackguard1.c @@ -17,6 +17,7 @@ <http://www.gnu.org/licenses/>. */ #include <errno.h> +#include <getopt.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> @@ -185,12 +186,20 @@ do_test (void) #define CMDLINE_OPTIONS \ { "command", required_argument, NULL, OPT_COMMAND }, \ { "child", no_argument, NULL, OPT_CHILD }, -#define CMDLINE_PROCESS \ - case OPT_COMMAND: \ - command = optarg; \ - break; \ - case OPT_CHILD: \ - child = true; \ - break; -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" + +static void __attribute__((used)) +cmdline_process_function (int c) +{ + switch (c) + { + case OPT_COMMAND: + command = optarg; + break; + case OPT_CHILD: + child = true; + break; + } +} +#define CMDLINE_PROCESS cmdline_process_function + +#include <support/test-driver.c> |