Skip to content

Commit

Permalink
fixes about debian build
Browse files Browse the repository at this point in the history
  • Loading branch information
sulincix committed May 10, 2024
1 parent 8f6f57d commit e80c28e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ if get_option('ansi')
args += ['-ansi']
endif

# some compiler flags from dpkg-buildpackage
args += ['-g', '-O2', '-Werror=implicit-function-declaration',
'-ffile-prefix-map=/root/ymp=.', '-fstack-protector-strong',
'-fstack-clash-protection', '-Wformat', '-Werror=format-security',
'-fcf-protection'
]

libc_srcs = []

start_code = []
Expand Down
1 change: 1 addition & 0 deletions src/ccode/colorize.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ int get_bool(char* name);

#ifdef __STRICT_ANSI__
#define strdup(A) strcpy(calloc(strlen(A) + 1, sizeof(char)), A);
extern int fileno(FILE *stream);
#endif

static char* int_to_string(int num){
Expand Down
5 changes: 5 additions & 0 deletions src/include/array.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
#define GETTEXT_PACKAGE "ymp"
#endif

#ifndef _array_h
#define _array_h

typedef struct {
char **data;
size_t size;
Expand All @@ -15,6 +18,7 @@ typedef struct {
array* array_new();
void array_add(array *arr, char* data);
void array_adds(array *arr, char** data, size_t len);
void array_set(array *arr, char** new_data, size_t len);
char **array_get(array *arr, int* len);
char *array_get_string(array *arr);
size_t array_length(array *arr);
Expand All @@ -27,3 +31,4 @@ void array_pop(array *arr, size_t index);
bool array_has(array *arr, char* item);
void array_remove(array* arr, char* item);

#endif

0 comments on commit e80c28e

Please sign in to comment.