Imported Upstream version 0.8.0.4
[psensor-pkg-debian.git] / src / lib / psensor_json.h
index d87a9ad..31ceb00 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010-2012 jeanfi@gmail.com
+ * Copyright (C) 2010-2013 jeanfi@gmail.com
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
 #ifndef _PSENSOR_PSENSOR_JSON_H_
 #define _PSENSOR_PSENSOR_JSON_H_
 
+#include "config.h"
+
+#ifdef HAVE_JSON_0
 #include <json/json.h>
+#else
+#include <json-c/json.h>
+#endif
 
 #include "psensor.h"
 
@@ -30,7 +36,7 @@ char *sensors_to_json_string(struct psensor **sensors);
  * Creates a new allocated psensor corresponding to a given json
  * representation.
  */
-struct psensor *psensor_new_from_json(json_object *o,
+struct psensor *psensor_new_from_json(json_object * o,
                                      const char *sensors_url,
                                      int values_max_length);
 #endif