summaryrefslogtreecommitdiffstats
path: root/ll-database-binding
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-10-25 11:29:20 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2017-10-25 11:29:20 +0200
commit1c7bbc7f2c7dd7e528371fdb6ccebdc3fd884e4f (patch)
tree65c21e43cfaeabd605eb244a4174715c6a33303f /ll-database-binding
parente8e37bb6e3cdc85dbab4e6cd97981340e50aa10c (diff)
database: use PATH_MAX of system
Change-Id: I4b6567eb738c710109a2799f31575f83f5d852d1 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'll-database-binding')
-rw-r--r--ll-database-binding/src/ll-database-binding.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/ll-database-binding/src/ll-database-binding.c b/ll-database-binding/src/ll-database-binding.c
index 14b8b20..bbbba80 100644
--- a/ll-database-binding/src/ll-database-binding.c
+++ b/ll-database-binding/src/ll-database-binding.c
@@ -23,7 +23,7 @@
#include <pwd.h>
#include <stdio.h>
#include <string.h>
-#include <linux/limits.h>
+#include <limits.h>
#include <json-c/json.h>
#include <db.h>
@@ -31,10 +31,6 @@
#define AFB_BINDING_VERSION 2
#include <afb/afb-binding.h>
-#ifndef MAX_PATH
-#define MAX_PATH 1024
-#endif
-
#define DBFILE "ll-database-binding.db"
#if !defined(TO_STRING_FLAGS)
@@ -92,7 +88,7 @@ static int get_database_path(char *buffer, size_t size)
*/
static int ll_database_binding_init()
{
- char path[MAX_PATH];
+ char path[PATH_MAX];
int ret;
ret = get_database_path(path, sizeof path);