diff options
author | Timur I. Bakeyev <timur@FreeBSD.org> | 2020-09-26 21:09:13 +0000 |
---|---|---|
committer | Timur I. Bakeyev <timur@FreeBSD.org> | 2020-09-26 21:09:13 +0000 |
commit | 93be2a4f8f0ccd7433e0ed30759a5f569cd30aad (patch) | |
tree | d49363764963fce8a491dc1ac11c3b104bf2ce38 /net/glusterfs/files/patch-libglusterfs_src_common-utils.c | |
parent | update to 3.34.0 (diff) |
An update to the net/glusterfs port:
- System call fixes backported from upstream
- Adding missing scripts to the SHEBANG_FILES list
- Correct a bug with extended attributes
- Fix detection of the PACKAGE_VERSION and generation of the correct API version
PR: 249492
Submitted by: maintainer
Reported by: timur
Notes
Notes:
svn path=/head/; revision=550225
Diffstat (limited to 'net/glusterfs/files/patch-libglusterfs_src_common-utils.c')
-rw-r--r-- | net/glusterfs/files/patch-libglusterfs_src_common-utils.c | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/net/glusterfs/files/patch-libglusterfs_src_common-utils.c b/net/glusterfs/files/patch-libglusterfs_src_common-utils.c index 0e3d73e575aa..9220c8eb3b7c 100644 --- a/net/glusterfs/files/patch-libglusterfs_src_common-utils.c +++ b/net/glusterfs/files/patch-libglusterfs_src_common-utils.c @@ -1,11 +1,34 @@ ---- libglusterfs/src/common-utils.c.orig 2020-05-18 20:57:54 UTC +--- libglusterfs/src/common-utils.c.orig 2020-07-06 01:22:37 UTC +++ libglusterfs/src/common-utils.c -@@ -3067,7 +3067,7 @@ get_mem_size() +@@ -3113,7 +3113,7 @@ get_mem_size() memsize = page_size * num_pages; #endif - + -#if defined GF_DARWIN_HOST_OS +#if defined GF_DARWIN_HOST_OS || defined __FreeBSD__ - + size_t len = sizeof(memsize); int name[] = {CTL_HW, HW_PHYSMEM}; +@@ -4127,6 +4127,14 @@ gf_skip_header_section(int fd, int header_len) + gf_boolean_t + gf_is_pid_running(int pid) + { ++#ifdef __FreeBSD__ ++ int ret = -1; ++ ++ ret = sys_kill(pid, 0); ++ if (ret < 0) { ++ return _gf_false; ++ } ++#else + char fname[32] = { + 0, + }; +@@ -4140,6 +4148,7 @@ gf_is_pid_running(int pid) + } + + sys_close(fd); ++#endif + return _gf_true; + } + |