mirror of
https://github.com/NikitaIvanovV/ctpv.git
synced 2025-01-09 18:18:11 +01:00
Fix: these are gnu-specific
This commit is contained in:
parent
da0bd88afa
commit
662a610bb6
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
#define FIFO_FILENAME_SIZE 256
|
#define FIFO_FILENAME_SIZE 256
|
||||||
|
|
||||||
static pid_t ueberzug_pid;
|
static int ueberzug_pid;
|
||||||
|
|
||||||
static volatile int do_exit = 0;
|
static volatile int do_exit = 0;
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ int spawn_redirect(const void *arg)
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int spawn_wait(pid_t pid, int *exitcode, int *signal)
|
int spawn_wait(int pid, int *exitcode, int *signal)
|
||||||
{
|
{
|
||||||
int stat;
|
int stat;
|
||||||
ERRCHK_RET_ERN(waitpid(pid, &stat, 0) == -1);
|
ERRCHK_RET_ERN(waitpid(pid, &stat, 0) == -1);
|
||||||
@ -51,13 +51,13 @@ int spawn_wait(pid_t pid, int *exitcode, int *signal)
|
|||||||
*
|
*
|
||||||
* cfunc is a function to call when child process is created
|
* cfunc is a function to call when child process is created
|
||||||
*/
|
*/
|
||||||
int spawn(char *args[], pid_t *cpid, int *exitcode, int *signal, int (*cfunc)(const void *),
|
int spawn(char *args[], int *cpid, int *exitcode, int *signal, int (*cfunc)(const void *),
|
||||||
const void *carg)
|
const void *carg)
|
||||||
{
|
{
|
||||||
if (exitcode)
|
if (exitcode)
|
||||||
*exitcode = -1;
|
*exitcode = -1;
|
||||||
|
|
||||||
pid_t pid = fork();
|
int pid = fork();
|
||||||
ERRCHK_RET_ERN(pid == -1);
|
ERRCHK_RET_ERN(pid == -1);
|
||||||
|
|
||||||
/* Child process */
|
/* Child process */
|
||||||
@ -125,7 +125,7 @@ int get_config_dir(char *buf, size_t len, char *name)
|
|||||||
return get_xdg_dir(buf, len, "XDG_CONFIG_HOME", ".config", name);
|
return get_xdg_dir(buf, len, "XDG_CONFIG_HOME", ".config", name);
|
||||||
}
|
}
|
||||||
|
|
||||||
int mkpath(char* file_path, mode_t mode)
|
int mkpath(char* file_path, int mode)
|
||||||
{
|
{
|
||||||
for (char* p = strchr(file_path + 1, '/'); p; p = strchr(p + 1, '/')) {
|
for (char* p = strchr(file_path + 1, '/'); p; p = strchr(p + 1, '/')) {
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
|
@ -24,8 +24,8 @@
|
|||||||
extern char *program;
|
extern char *program;
|
||||||
|
|
||||||
int spawn_redirect(const void *arg);
|
int spawn_redirect(const void *arg);
|
||||||
int spawn_wait(pid_t pid, int *exitcode, int *signal);
|
int spawn_wait(int pid, int *exitcode, int *signal);
|
||||||
int spawn(char *args[], pid_t *cpid, int *exitcode, int *signal,
|
int spawn(char *args[], int *cpid, int *exitcode, int *signal,
|
||||||
int (*cfunc)(const void *), const void *carg);
|
int (*cfunc)(const void *), const void *carg);
|
||||||
|
|
||||||
int strcmpnull(const char *s1, const char *s2);
|
int strcmpnull(const char *s1, const char *s2);
|
||||||
@ -34,7 +34,7 @@ int strlennull(const char *s);
|
|||||||
int get_cache_dir(char *buf, size_t len, char *name);
|
int get_cache_dir(char *buf, size_t len, char *name);
|
||||||
int get_config_dir(char *buf, size_t len, char *name);
|
int get_config_dir(char *buf, size_t len, char *name);
|
||||||
|
|
||||||
int mkpath(char* file_path, mode_t mode);
|
int mkpath(char* file_path, int mode);
|
||||||
const char *get_ext(const char *path);
|
const char *get_ext(const char *path);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user