Skip to content

Commit

Permalink
cleanup(scap): move strl.h into libscap
Browse files Browse the repository at this point in the history
Yes, the strl* functions are used in libsinsp too, but that
doesn't make them too different from all the other helper
functions.

Eventually this could become a tiny library of its own but we're
not quite there yet.

Signed-off-by: Grzegorz Nosek <[email protected]>
  • Loading branch information
gnosek authored and poiana committed Nov 2, 2023
1 parent 5ee8c6c commit dfb2a15
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmake/modules/libscap.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ else()
message(STATUS "No strlcat found, will use local definition")
endif()

configure_file(${LIBSCAP_DIR}/userspace/common/common_config.h.in ${PROJECT_BINARY_DIR}/common/common_config.h)
include_directories(${PROJECT_BINARY_DIR}/common)

add_definitions(-DPLATFORM_NAME="${CMAKE_SYSTEM_NAME}")
Expand Down Expand Up @@ -148,5 +147,6 @@ install(DIRECTORY "${LIBSCAP_DIR}/userspace/plugin" DESTINATION "${CMAKE_INSTALL
COMPONENT "scap"
FILES_MATCHING PATTERN "*.h")
install(FILES ${PROJECT_BINARY_DIR}/libscap/scap_config.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${LIBS_PACKAGE_NAME}/userspace/libscap)
install(FILES ${PROJECT_BINARY_DIR}/libscap/scap_strl_config.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${LIBS_PACKAGE_NAME}/userspace/libscap)
install(FILES ${PROJECT_BINARY_DIR}/libscap/libscap.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
endif()
2 changes: 2 additions & 0 deletions userspace/libscap/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ endif()

include_directories(${CMAKE_CURRENT_SOURCE_DIR})

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scap_strl_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/scap_strl_config.h)

add_library(scap
scap.c
scap_api_version.c
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion userspace/common/strl.h → userspace/libscap/strl.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.

#include <sys/types.h>
#include <string.h>
#include "common_config.h"
#include "scap_strl_config.h"

#pragma once

Expand Down

0 comments on commit dfb2a15

Please sign in to comment.