aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2011-01-13 21:21:19 +0100
committerAris Adamantiadis <aris@0xbadc0de.be>2011-01-13 21:21:19 +0100
commit0b46f68c5fda153c9ca164766b83da430d1ef02e (patch)
tree767e8a75c657bbdaddbe1a772d017fd5d95067f4
parent2917e71aadae004f3a353c3de0672d7534e1a2bf (diff)
downloadlibssh-0b46f68c5fda153c9ca164766b83da430d1ef02e.tar.gz
libssh-0b46f68c5fda153c9ca164766b83da430d1ef02e.tar.xz
libssh-0b46f68c5fda153c9ca164766b83da430d1ef02e.zip
Fixed compilation without argp.h available
-rw-r--r--examples/samplesshd.c3
-rw-r--r--tests/benchmarks/benchmarks.c13
-rw-r--r--tests/cmdline.c4
3 files changed, 16 insertions, 4 deletions
diff --git a/examples/samplesshd.c b/examples/samplesshd.c
index 52ab7b9..f192ef8 100644
--- a/examples/samplesshd.c
+++ b/examples/samplesshd.c
@@ -191,6 +191,9 @@ int main(int argc, char **argv){
* be reflected in arguments.
*/
argp_parse (&argp, argc, argv, 0, 0, sshbind);
+#else
+ (void) argc;
+ (void) argv;
#endif
#ifdef WITH_PCAP
set_pcap(session);
diff --git a/tests/benchmarks/benchmarks.c b/tests/benchmarks/benchmarks.c
index e926f92..7ff6172 100644
--- a/tests/benchmarks/benchmarks.c
+++ b/tests/benchmarks/benchmarks.c
@@ -27,6 +27,11 @@
#include <stdlib.h>
#include <stdio.h>
+const char *libssh_benchmarks_names[]={
+ "null",
+ "benchmark_raw_upload"
+};
+
#ifdef HAVE_ARGP_H
#include <argp.h>
@@ -38,10 +43,6 @@ static char **cmdline;
/* Program documentation. */
static char doc[] = "libssh benchmarks";
-const char *libssh_benchmarks_names[]={
- "null",
- "benchmark_raw_upload"
-};
/* The options we understand. */
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
argp_parse(&argp, argc, argv, 0, 0, arguments);
+#else /* HAVE_ARGP_H */
+ (void) argc;
+ (void) argv;
+ (void) arguments;
#endif /* HAVE_ARGP_H */
}
diff --git a/tests/cmdline.c b/tests/cmdline.c
index 9619fd2..4e2a7d0 100644
--- a/tests/cmdline.c
+++ b/tests/cmdline.c
@@ -63,5 +63,9 @@ void torture_cmdline_parse(int argc, char **argv, struct argument_s *arguments)
*/
#ifdef HAVE_ARGP_H
argp_parse(&argp, argc, argv, 0, 0, arguments);
+#else
+ (void) argc;
+ (void) argv;
+ (void) arguments;
#endif /* HAVE_ARGP_H */
}