]> sigrok.org Git - sigrok-cli.git/commitdiff
fix build without libsigrokdecode
authorDan Horák <redacted>
Sat, 25 Jan 2014 13:15:24 +0000 (14:15 +0100)
committerUwe Hermann <redacted>
Tue, 28 Jan 2014 14:52:19 +0000 (15:52 +0100)
When built with libsigrokdecode additional headers are automagically included
via the Python.h header. When built without they must included explicitly.

input.c
main.c
sigrok-cli.h

diff --git a/input.c b/input.c
index 5650b9f8d1a317644c32f537f91bbf714a86a054..4d3f358ab1316abafee71587085de4a3e83615eb 100644 (file)
--- a/input.c
+++ b/input.c
 
 #include "sigrok-cli.h"
 #include "config.h"
+#include <sys/stat.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
 #include <glib.h>
 
 extern gchar *opt_input_file;
diff --git a/main.c b/main.c
index 9ab3f77cc49baa64dae8e72e1a44ab19b841fb0d..5dcee2cd25d680709ae5506ee66efa6dadefe75f 100644 (file)
--- a/main.c
+++ b/main.c
@@ -19,6 +19,7 @@
 
 #include "sigrok-cli.h"
 #include "config.h"
+#include <stdlib.h>
 #include <glib.h>
 
 struct sr_context *sr_ctx = NULL;
index 7a05fc48302a4d5adbd75c48523843deba41a226..4d2f0f2ffba3fde4bb5c61475bb2ee5b646f369f 100644 (file)
@@ -54,6 +54,7 @@ void run_session(void);
 void load_input_file(void);
 
 /* decode.c */
+#ifdef HAVE_SRD
 int register_pds(const char *opt_pds, char *opt_pd_annotations);
 int setup_pd_stack(char *opt_pds, char *opt_pd_stack, char *opt_pd_annotations);
 int setup_pd_annotations(char *opt_pd_annotations);
@@ -62,6 +63,7 @@ int setup_pd_binary(char *opt_pd_binary);
 void show_pd_annotations(struct srd_proto_data *pdata, void *cb_data);
 void show_pd_meta(struct srd_proto_data *pdata, void *cb_data);
 void show_pd_binary(struct srd_proto_data *pdata, void *cb_data);
+#endif
 
 /* parsers.c */
 GSList *parse_probestring(struct sr_dev_inst *sdi, const char *probestring);