1
1

Fixed compilation without argp.h available

Этот коммит содержится в:
Aris Adamantiadis 2011-01-13 21:21:19 +01:00
родитель 2917e71aad
Коммит 0b46f68c5f
3 изменённых файлов: 16 добавлений и 4 удалений

Просмотреть файл

@ -191,6 +191,9 @@ int main(int argc, char **argv){
* be reflected in arguments. * be reflected in arguments.
*/ */
argp_parse (&argp, argc, argv, 0, 0, sshbind); argp_parse (&argp, argc, argv, 0, 0, sshbind);
#else
(void) argc;
(void) argv;
#endif #endif
#ifdef WITH_PCAP #ifdef WITH_PCAP
set_pcap(session); set_pcap(session);

Просмотреть файл

@ -27,6 +27,11 @@
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
const char *libssh_benchmarks_names[]={
"null",
"benchmark_raw_upload"
};
#ifdef HAVE_ARGP_H #ifdef HAVE_ARGP_H
#include <argp.h> #include <argp.h>
@ -38,10 +43,6 @@ static char **cmdline;
/* Program documentation. */ /* Program documentation. */
static char doc[] = "libssh benchmarks"; static char doc[] = "libssh benchmarks";
const char *libssh_benchmarks_names[]={
"null",
"benchmark_raw_upload"
};
/* The options we understand. */ /* The options we understand. */
static struct argp_option options[] = { static struct argp_option options[] = {
@ -122,6 +123,10 @@ static void cmdline_parse(int argc, char **argv, struct argument_s *arguments) {
*/ */
#ifdef HAVE_ARGP_H #ifdef HAVE_ARGP_H
argp_parse(&argp, argc, argv, 0, 0, arguments); argp_parse(&argp, argc, argv, 0, 0, arguments);
#else /* HAVE_ARGP_H */
(void) argc;
(void) argv;
(void) arguments;
#endif /* HAVE_ARGP_H */ #endif /* HAVE_ARGP_H */
} }

Просмотреть файл

@ -63,5 +63,9 @@ void torture_cmdline_parse(int argc, char **argv, struct argument_s *arguments)
*/ */
#ifdef HAVE_ARGP_H #ifdef HAVE_ARGP_H
argp_parse(&argp, argc, argv, 0, 0, arguments); argp_parse(&argp, argc, argv, 0, 0, arguments);
#else
(void) argc;
(void) argv;
(void) arguments;
#endif /* HAVE_ARGP_H */ #endif /* HAVE_ARGP_H */
} }