Skip to content
Snippets Groups Projects
Commit e21de8dc authored by Harout Hedeshian's avatar Harout Hedeshian
Browse files

datatop: fix compilation errors

Not all platforms have strlcpy and strlcmp. Fall back to strcpy
and strcmp for platforms which are missing these functions.

Change-Id: Ied2913295e66f695c8b5f2cba49ec34fbe789ed8
parent 6202ba7e
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,7 @@ LOCAL_SRC_FILES += datatop_value_only_poll.c
LOCAL_CFLAGS := -Wall -Wextra -Werror -pedantic
LOCAL_CFLAGS += -DVERSION="\"1.0.4"\"
LOCAL_CFLAGS += -DHAVE_STRL_FUNCTIONS
LOCAL_C_INCLUDES := $(LOCAL_PATH)
......
......@@ -156,4 +156,11 @@ int dtop_write_pollingdata_csv(struct dtop_linked_list *dpg_list, FILE *fw);
void dtop_reset_dp_initial_values(struct dtop_linked_list *dpg_list);
void deconstruct_dpgs(struct dtop_linked_list *dpg_list);
int dtop_print_system_snapshot(char *file);
#ifndef HAVE_STRL_FUNCTIONS
#define strlcpy(X,Y,Z) strcpy(X,Y)
#define strlcat(X,Y,Z) strcat(X,Y)
#endif /* HAVE_STRL_FUNCTIONS */
#endif /* DATATOP_INTERFACE_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment