mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-29 06:46:35 -04:00
Fixed headers for FreeBSD
This commit is contained in:
parent
6bac1bd257
commit
6d17515646
7 changed files with 28 additions and 0 deletions
4
client.c
4
client.c
|
|
@ -10,7 +10,11 @@
|
|||
#include <errno.h>
|
||||
|
||||
#include <sys/socket.h>
|
||||
#if __linux__
|
||||
#include <linux/un.h>
|
||||
#elif __FreeBSD__
|
||||
#include <sys/un.h>
|
||||
#endif
|
||||
|
||||
#define LOG_MODULE "foot-client"
|
||||
#define LOG_ENABLE_DBG 0
|
||||
|
|
|
|||
4
main.c
4
main.c
|
|
@ -10,7 +10,11 @@
|
|||
#include <unistd.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#if __linux__
|
||||
#include <sys/sysinfo.h>
|
||||
#elif __FreeBSD__
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
|
||||
#include <fcft/fcft.h>
|
||||
|
|
|
|||
4
osc.c
4
osc.c
|
|
@ -327,7 +327,11 @@ osc_set_pwd(struct terminal *term, char *string)
|
|||
if (hostname_end == NULL)
|
||||
return;
|
||||
|
||||
#if __linux__
|
||||
char this_host[HOST_NAME_MAX];
|
||||
#elif __FreeBSD__
|
||||
char this_host[sysconf(_SC_HOST_NAME_MAX)];
|
||||
#endif
|
||||
if (gethostname(this_host, sizeof(this_host)) < 0)
|
||||
this_host[0] = '\0';
|
||||
|
||||
|
|
|
|||
5
render.c
5
render.c
|
|
@ -807,8 +807,13 @@ render_worker_thread(void *_ctx)
|
|||
char proc_title[16];
|
||||
snprintf(proc_title, sizeof(proc_title), "foot:render:%d", my_id);
|
||||
|
||||
#if __linux__
|
||||
if (prctl(PR_SET_NAME, proc_title, 0, 0, 0) < 0)
|
||||
LOG_ERRNO("render worker %d: failed to set process title", my_id);
|
||||
#elif __FreeBSD__
|
||||
setproctitle(proc_title);
|
||||
#endif
|
||||
|
||||
|
||||
sem_t *start = &term->render.workers.start;
|
||||
sem_t *done = &term->render.workers.done;
|
||||
|
|
|
|||
4
server.c
4
server.c
|
|
@ -8,7 +8,11 @@
|
|||
#include <sys/socket.h>
|
||||
#include <sys/epoll.h>
|
||||
|
||||
#if __linux__
|
||||
#include <linux/un.h>
|
||||
#elif __FreeBSD__
|
||||
#include <sys/un.h>
|
||||
#endif
|
||||
|
||||
#include <tllist.h>
|
||||
|
||||
|
|
|
|||
2
shm.c
2
shm.c
|
|
@ -10,8 +10,10 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/time.h>
|
||||
#if __linux__
|
||||
#include <linux/mman.h>
|
||||
#include <linux/memfd.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
|
||||
#include <pixman.h>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,11 @@
|
|||
#include "terminal.h"
|
||||
|
||||
#if __linux__
|
||||
#include <malloc.h>
|
||||
#elif __FreeBSD__
|
||||
#include <stdlib.h>
|
||||
#include <signal.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <assert.h>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue