main: add pledge call on OpenBSD

This commit is contained in:
codesoap 2023-04-22 22:59:46 +02:00
parent 8687c1f258
commit b1a8c244ce

View file

@ -43,6 +43,13 @@ void sigint_handler(int signo) {
#endif
int main(int argc, char ** argv) {
#if defined (__OpenBSD__)
if (pledge("stdio rpath", "") == -1) {
fprintf(stderr, "%s: error: pledge failed\n", __func__);
return 1;
}
#endif
gpt_params params;
params.model = "models/llama-7B/ggml-model.bin";