Skip to content

Commit

Permalink
Fix cjson include paths.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralight committed Dec 4, 2020
1 parent 5679a4d commit 791c633
Show file tree
Hide file tree
Showing 23 changed files with 25 additions and 24 deletions.
3 changes: 3 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
- Fix cjson include paths.


2.0.0 - 2020-12-03
==================

Expand Down
2 changes: 1 addition & 1 deletion apps/mosquitto_ctrl/dynsec.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ SPDX-License-Identifier: EPL-2.0 OR EDL-1.0
*/
#include "config.h"

#include <cJSON.h>
#include <cjson/cJSON.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand Down
2 changes: 1 addition & 1 deletion apps/mosquitto_ctrl/dynsec_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ SPDX-License-Identifier: EPL-2.0 OR EDL-1.0
Contributors:
Roger Light - initial implementation and documentation.
*/
#include <cJSON.h>
#include <cjson/cJSON.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand Down
2 changes: 1 addition & 1 deletion apps/mosquitto_ctrl/dynsec_group.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ SPDX-License-Identifier: EPL-2.0 OR EDL-1.0
Contributors:
Roger Light - initial implementation and documentation.
*/
#include <cJSON.h>
#include <cjson/cJSON.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand Down
2 changes: 1 addition & 1 deletion apps/mosquitto_ctrl/dynsec_role.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ SPDX-License-Identifier: EPL-2.0 OR EDL-1.0
*/
#include "config.h"

#include <cJSON.h>
#include <cjson/cJSON.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand Down
2 changes: 1 addition & 1 deletion apps/mosquitto_ctrl/example.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ SPDX-License-Identifier: EPL-2.0 OR EDL-1.0
Contributors:
Roger Light - initial implementation and documentation.
*/
#include <cJSON.h>
#include <cjson/cJSON.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand Down
2 changes: 1 addition & 1 deletion apps/mosquitto_ctrl/mosquitto_ctrl.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ SPDX-License-Identifier: EPL-2.0 OR EDL-1.0
#ifndef MOSQUITTO_CTRL_H
#define MOSQUITTO_CTRL_H

#include <cJSON.h>
#include <cjson/cJSON.h>
#include <stdbool.h>

#include "mosquitto.h"
Expand Down
2 changes: 1 addition & 1 deletion client/sub_client_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ SPDX-License-Identifier: EPL-2.0 OR EDL-1.0
#endif

#ifdef WITH_CJSON
# include <cJSON.h>
# include <cjson/cJSON.h>
#endif

#ifdef __APPLE__
Expand Down
4 changes: 1 addition & 3 deletions cmake/FindcJSON.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ ENDIF()

FIND_PATH(
CJSON_INCLUDE_DIR
cJSON.h
cjson/cJSON.h
HINTS
CJSON_DIR
/usr/include/cjson
/usr/local/include/cjson
)

FIND_LIBRARY( CJSON_LIBRARY
Expand Down
2 changes: 1 addition & 1 deletion config.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
#endif

#ifdef WITH_CJSON
# include <cJSON.h>
# include <cjson/cJSON.h>
# define CJSON_VERSION_FULL (CJSON_VERSION_MAJOR*1000000+CJSON_VERSION_MINOR*1000+CJSON_VERSION_PATCH)
#endif

Expand Down
2 changes: 1 addition & 1 deletion config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ ifeq ($(WITH_COVERAGE),yes)
endif

ifeq ($(WITH_CJSON),yes)
CLIENT_CFLAGS:=$(CLIENT_CFLAGS) -DWITH_CJSON -I/usr/include/cjson -I/usr/local/include/cjson
CLIENT_CFLAGS:=$(CLIENT_CFLAGS) -DWITH_CJSON
CLIENT_LDADD:=$(CLIENT_LDADD) -lcjson
CLIENT_STATIC_LDADD:=$(CLIENT_STATIC_LDADD) -lcjson
CLIENT_LDFLAGS:=$(CLIENT_LDFLAGS) -L/usr/local/lib
Expand Down
2 changes: 1 addition & 1 deletion plugins/dynamic-security/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ include ../../config.mk
.PHONY : all binary check clean reallyclean test install uninstall

PLUGIN_NAME=mosquitto_dynamic_security
LOCAL_CPPFLAGS=-I/usr/include/cjson -I/usr/local/include/cjson -I../../src/
LOCAL_CPPFLAGS=-I../../src/
LOCAL_LDFLAGS=-L/usr/local/lib

OBJS= \
Expand Down
2 changes: 1 addition & 1 deletion plugins/dynamic-security/clientlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ SPDX-License-Identifier: EPL-2.0 OR EDL-1.0

#include "config.h"

#include <cJSON.h>
#include <cjson/cJSON.h>
#include <stdio.h>
#include <uthash.h>

Expand Down
2 changes: 1 addition & 1 deletion plugins/dynamic-security/clients.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ SPDX-License-Identifier: EPL-2.0 OR EDL-1.0

#include "config.h"

#include <cJSON.h>
#include <cjson/cJSON.h>
#include <stdio.h>
#include <uthash.h>

Expand Down
2 changes: 1 addition & 1 deletion plugins/dynamic-security/dynamic_security.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ SPDX-License-Identifier: EPL-2.0 OR EDL-1.0
Roger Light - initial implementation and documentation.
*/

#include <cJSON.h>
#include <cjson/cJSON.h>
#include <uthash.h>
#include "mosquitto.h"
#include "password_mosq.h"
Expand Down
2 changes: 1 addition & 1 deletion plugins/dynamic-security/grouplist.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ SPDX-License-Identifier: EPL-2.0 OR EDL-1.0

#include "config.h"

#include <cJSON.h>
#include <cjson/cJSON.h>
#include <stdio.h>
#include <uthash.h>

Expand Down
2 changes: 1 addition & 1 deletion plugins/dynamic-security/groups.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ SPDX-License-Identifier: EPL-2.0 OR EDL-1.0

#include "config.h"

#include <cJSON.h>
#include <cjson/cJSON.h>
#include <stdio.h>
#include <uthash.h>

Expand Down
2 changes: 1 addition & 1 deletion plugins/dynamic-security/json_help.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ SPDX-License-Identifier: EPL-2.0 OR EDL-1.0

#include "config.h"

#include <cJSON.h>
#include <cjson/cJSON.h>
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
Expand Down
2 changes: 1 addition & 1 deletion plugins/dynamic-security/json_help.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ SPDX-License-Identifier: EPL-2.0 OR EDL-1.0
Contributors:
Roger Light - initial implementation and documentation.
*/
#include <cJSON.h>
#include <cjson/cJSON.h>
#include <stdbool.h>

/* "optional==false" can also be taken to mean "only return success if the key exists and is valid" */
Expand Down
2 changes: 1 addition & 1 deletion plugins/dynamic-security/plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ SPDX-License-Identifier: EPL-2.0 OR EDL-1.0

#include "config.h"

#include <cJSON.h>
#include <cjson/cJSON.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
Expand Down
2 changes: 1 addition & 1 deletion plugins/dynamic-security/rolelist.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ SPDX-License-Identifier: EPL-2.0 OR EDL-1.0

#include "config.h"

#include <cJSON.h>
#include <cjson/cJSON.h>
#include <stdio.h>
#include <string.h>
#include <uthash.h>
Expand Down
2 changes: 1 addition & 1 deletion plugins/dynamic-security/roles.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ SPDX-License-Identifier: EPL-2.0 OR EDL-1.0

#include "config.h"

#include <cJSON.h>
#include <cjson/cJSON.h>
#include <stdio.h>
#include <string.h>
#include <uthash.h>
Expand Down
2 changes: 1 addition & 1 deletion snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ parts:
- lws
- cjson
plugin: make
make-parameters: ["prefix=/usr", "WITH_WEBSOCKETS=yes", "WITH_ADNS=yes", "CFLAGS=-Wall -ggdb -O2 -I$SNAPCRAFT_STAGE/include -I$SNAPCRAFT_STAGE/include/cjson -D_GNU_SOURCE"]
make-parameters: ["prefix=/usr", "WITH_WEBSOCKETS=yes", "WITH_ADNS=yes", "CFLAGS=-Wall -ggdb -O2 -I$SNAPCRAFT_STAGE/include -D_GNU_SOURCE"]
source: https://github.com/eclipse/mosquitto
source-type: git

Expand Down

0 comments on commit 791c633

Please sign in to comment.