Skip to content

Commit c27adaa

Browse files
committed
changed char* to const char*
1 parent 1c5a8be commit c27adaa

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
cmake_minimum_required(VERSION 3.9.0)
22
project(Minecraft-server-query VERSION 0.1.0 LANGUAGES C)
3+
link_libraries("-static")
34
if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
45
message(STATUS "GCC")
56
add_compile_options(-ffunction-sections -fdata-sections)
@@ -25,7 +26,7 @@ else()
2526
message(WARNING "IPO is not supported: ${output}")
2627
endif()
2728

28-
target_link_libraries(Minecraft-server-query plibsys)
29+
target_link_libraries(Minecraft-server-query plibsysstatic)
2930

3031

3132
option(BUILD_EXAMPLE_IMPLEMENTATION "Build example" ON)
@@ -39,4 +40,5 @@ if (BUILD_EXAMPLE_IMPLEMENTATION)
3940
set_property(TARGET msq_example PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
4041
endif()
4142
target_link_libraries(msq_example Minecraft-server-query)
43+
install(TARGETS msq_example)
4244
endif()

include/minecraft_server_query_api.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ typedef struct
3030
char **players;
3131
} msq_full_stats_t;
3232

33-
int msq_init(char *ip, int port);
33+
int msq_init(const char *ip, int port);
3434
int msq_get_basic_stats(msq_basic_stats_t *ret);
3535
int msq_get_full_stats(msq_full_stats_t *ret);
3636
char *msq_get_error(int c);

src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ int check_for_endianness()
5151
return (int)*c;
5252
}
5353

54-
int msq_init(char *ip, int port)
54+
int msq_init(const char *ip, int port)
5555
{
5656
if (init != 0)
5757
{

0 commit comments

Comments
 (0)