mirror of
https://codeberg.org/dwl/dwl-patches.git
synced 2026-06-11 10:23:19 +00:00
swallow: rewrite patch, update README.md
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
From 49dc947ba4c33324b969ef7179768c806910fffb Mon Sep 17 00:00:00 2001
|
||||
From: choc <notchoc@proton.me>
|
||||
Date: Sat, 22 Jun 2024 10:52:33 +0800
|
||||
Subject: [PATCH] swallow: add freebsd support
|
||||
From 002e11e197cd254f06b65681ffd5bcf617d830b9 Mon Sep 17 00:00:00 2001
|
||||
From: Nikita Ivanov <nikita.vyach.ivanov@gmail.com>
|
||||
Date: Mon, 3 Mar 2025 19:49:07 +0100
|
||||
Subject: [PATCH] swallow: add FreeBSD support
|
||||
|
||||
---
|
||||
dwl.c | 17 +++++++++++++++++
|
||||
1 file changed, 17 insertions(+)
|
||||
|
||||
diff --git a/dwl.c b/dwl.c
|
||||
index 3a3167b..ee9e965 100644
|
||||
index bbbbe6f..dc55319 100644
|
||||
--- a/dwl.c
|
||||
+++ b/dwl.c
|
||||
@@ -65,6 +65,14 @@
|
||||
@@ -67,6 +67,14 @@
|
||||
#include <xcb/xcb_icccm.h>
|
||||
#endif
|
||||
|
||||
@@ -26,17 +26,17 @@ index 3a3167b..ee9e965 100644
|
||||
#include "util.h"
|
||||
|
||||
/* macros */
|
||||
@@ -1486,6 +1494,7 @@ handlesig(int signo)
|
||||
@@ -2032,6 +2040,7 @@ outputmgrtest(struct wl_listener *listener, void *data)
|
||||
pid_t
|
||||
getparentprocess(pid_t p)
|
||||
parentpid(pid_t pid)
|
||||
{
|
||||
+#ifdef __linux__
|
||||
unsigned int v = 0;
|
||||
|
||||
FILE *f;
|
||||
@@ -1499,6 +1508,14 @@ getparentprocess(pid_t p)
|
||||
char buf[256];
|
||||
@@ -2041,6 +2050,14 @@ parentpid(pid_t pid)
|
||||
fscanf(f, "%*u %*s %*c %u", &v);
|
||||
fclose(f);
|
||||
|
||||
return (pid_t)v;
|
||||
+#elif defined(__FreeBSD__)
|
||||
+ struct kinfo_proc kip;
|
||||
@@ -48,8 +48,7 @@ index 3a3167b..ee9e965 100644
|
||||
+#endif
|
||||
}
|
||||
|
||||
int
|
||||
void
|
||||
--
|
||||
2.43.0
|
||||
|
||||
2.48.1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user