fix: strlcpy could be in libbsd

This commit is contained in:
2025-11-10 14:05:02 +01:00
parent 4492ce4fd0
commit f5bf71f535
7 changed files with 10 additions and 5 deletions
+3 -3
View File
@@ -14,9 +14,9 @@ jobs:
with: with:
submodules: 'true' submodules: 'true'
- name: install libs - name: install libs
run: sudo apt install -y libglfw3-dev libgl-dev libv4l-dev libasound2-dev run: sudo apt install -y libglfw3-dev libgl-dev libv4l-dev libasound2-dev libbsd-dev
- name: gcc - name: gcc
run: mkdir -p build && gcc -v -Wall -Wextra -Werror -Wno-format-truncation src/*.c src/*.h -lglfw -lGL -lm -lasound -Iinclude hashmap.c/hashmap.c log.c/src/log.c -DGLFW_INCLUDE_NONE -DGLFW_EXPOSE_NATIVE_EGL -DGLFW_NATIVE_INCLUDE_NONE run: mkdir -p build && gcc -v -Wall -Wextra -Werror -Wno-format-truncation src/*.c src/*.h -lglfw -lGL -lm -lasound -lbsd -Iinclude hashmap.c/hashmap.c log.c/src/log.c -DGLFW_INCLUDE_NONE -DGLFW_EXPOSE_NATIVE_EGL -DGLFW_NATIVE_INCLUDE_NONE
build-release: build-release:
needs: lint needs: lint
@@ -26,7 +26,7 @@ jobs:
with: with:
submodules: 'true' submodules: 'true'
- name: install libs - name: install libs
run: sudo apt install -y libglfw3-dev libgl-dev libv4l-dev libasound2-dev run: sudo apt install -y libglfw3-dev libgl-dev libv4l-dev libasound2-dev libbsd-dev
- name: aclocal - name: aclocal
run: aclocal run: aclocal
- name: autoconf - name: autoconf
+1 -1
View File
@@ -2,7 +2,7 @@ AUTOMAKE_OPTIONS = foreign subdir-objects -Wall
bin_PROGRAMS = forge bin_PROGRAMS = forge
forge_SOURCES = src/args.c src/arr.c src/config_file.c src/file.c src/forge.c src/main.c src/midi.c src/preo src/rand.c src/shaders.c src/shared.c src/state.c src/string.c src/tempo.c src/timer.c src/video.c src/window.c $(top_srcdir)/include/glad/gl.h $(top_srcdir)/include/glad/egl.h $(top_srcdir)/hashmap.c/hashmap.c $(top_srcdir)/log.c/src/log.c forge_SOURCES = src/args.c src/arr.c src/config_file.c src/file.c src/forge.c src/main.c src/midi.c src/preo src/rand.c src/shaders.c src/shared.c src/state.c src/string.c src/tempo.c src/timer.c src/video.c src/window.c $(top_srcdir)/include/glad/gl.h $(top_srcdir)/include/glad/egl.h $(top_srcdir)/hashmap.c/hashmap.c $(top_srcdir)/log.c/src/log.c
forge_CFLAGS = -Ofast -march=native -flto -funroll-loops -fprefetch-loop-arrays -fno-exceptions -fopenmp -I$(top_srcdir)/include -DGLFW_INCLUDE_NONE -DGLFW_EXPOSE_NATIVE_EGL -DGLFW_NATIVE_INCLUDE_NONE -DLOG_USE_COLOR -DDATADIR=\"$(datadir)/$(PACKAGE)\" forge_CFLAGS = -Ofast -march=native -flto -funroll-loops -fprefetch-loop-arrays -fno-exceptions -fopenmp -I$(top_srcdir)/include -DGLFW_INCLUDE_NONE -DGLFW_EXPOSE_NATIVE_EGL -DGLFW_NATIVE_INCLUDE_NONE -DLOG_USE_COLOR -DDATADIR=\"$(datadir)/$(PACKAGE)\"
forge_LDADD = -lm -lGL -lglfw -lasound forge_LDADD = -lm -lGL -lglfw -lasound -lbsd
include_HEADERS = src/args.h src/arr.h src/config.h src/config_file.h src/constants.h src/file.h src/forge.h src/main.h src/midi.h src/project.h src/rand.h src/shaders.h src/shared.h src/state.h src/string.h src/tempo.h src/timer.h src/types.h src/video.h src/window.h $(top_srcdir)/include/glad/gl.h $(top_srcdir)/include/glad/egl.h $(top_srcdir)/include/linmath.h $(top_srcdir)/include/hashmap.h $(top_srcdir)/include/log.h include_HEADERS = src/args.h src/arr.h src/config.h src/config_file.h src/constants.h src/file.h src/forge.h src/main.h src/midi.h src/project.h src/rand.h src/shaders.h src/shared.h src/state.h src/string.h src/tempo.h src/timer.h src/types.h src/video.h src/window.h $(top_srcdir)/include/glad/gl.h $(top_srcdir)/include/glad/egl.h $(top_srcdir)/include/linmath.h $(top_srcdir)/include/hashmap.h $(top_srcdir)/include/log.h
EXTRA_DIST = default/forge_project.cfg default/frag0.glsl default/frag1.glsl default/frag2.glsl default/frag3.glsl default/frag4.glsl default/frag5.glsl default/frag6.glsl default/frag7.glsl default/frag8.glsl default/frag9.glsl default/frag10.glsl EXTRA_DIST = default/forge_project.cfg default/frag0.glsl default/frag1.glsl default/frag2.glsl default/frag3.glsl default/frag4.glsl default/frag5.glsl default/frag6.glsl default/frag7.glsl default/frag8.glsl default/frag9.glsl default/frag10.glsl
+1 -1
View File
@@ -14,7 +14,7 @@ build:
-Iinclude \ -Iinclude \
hashmap.c/hashmap.c \ hashmap.c/hashmap.c \
log.c/src/log.c \ log.c/src/log.c \
-lm -lGL -lglfw -lasound \ -lm -lGL -lglfw -lasound -lbsd \
-Wall -Wextra \ -Wall -Wextra \
-Wno-format-truncation \ -Wno-format-truncation \
-DGLFW_INCLUDE_NONE \ -DGLFW_INCLUDE_NONE \
+1
View File
@@ -54,6 +54,7 @@ TODO
| libGL | libgl-dev | extra/libglvnd | | libGL | libgl-dev | extra/libglvnd |
| libasound | libasound2-dev | extra/alsa-lib | | libasound | libasound2-dev | extra/alsa-lib |
| libv4l2 | libv4l-dev | extra/v4l-utils | | libv4l2 | libv4l-dev | extra/v4l-utils |
| libbsd | libbsd-dev | extra/libbsd |
### From release ### From release
+2
View File
@@ -23,6 +23,8 @@ AC_CHECK_HEADERS([string.h])
AC_CHECK_HEADERS([time.h]) AC_CHECK_HEADERS([time.h])
AC_CHECK_HEADERS([unistd.h]) AC_CHECK_HEADERS([unistd.h])
AC_CHECK_HEADERS([bsd/string.h])
AC_CHECK_HEADERS([linux/videodev2.h]) AC_CHECK_HEADERS([linux/videodev2.h])
AC_CHECK_HEADERS([alsa/rawmidi.h]) AC_CHECK_HEADERS([alsa/rawmidi.h])
+1
View File
@@ -1,3 +1,4 @@
#include <bsd/string.h>
#include <string.h> #include <string.h>
#include "types.h" #include "types.h"
+1
View File
@@ -1,3 +1,4 @@
#include <bsd/string.h>
#include <stdbool.h> #include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>