Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107152678
D42201.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D42201.diff
View Options
diff --git a/lib/libprocstat/libprocstat.h b/lib/libprocstat/libprocstat.h
--- a/lib/libprocstat/libprocstat.h
+++ b/lib/libprocstat/libprocstat.h
@@ -102,6 +102,11 @@
#define PS_FST_FFLAG_EXEC 0x2000
#define PS_FST_FFLAG_HASLOCK 0x4000
+#if !defined(__ILP32__) && !defined(__riscv)
+/* Target architecture supports 32-bit compat */
+#define PS_ARCH_HAS_FREEBSD32 1
+#endif
+
struct kinfo_kstack;
struct kinfo_proc;
struct kinfo_vmentry;
diff --git a/lib/libprocstat/libprocstat.c b/lib/libprocstat/libprocstat.c
--- a/lib/libprocstat/libprocstat.c
+++ b/lib/libprocstat/libprocstat.c
@@ -2381,7 +2381,7 @@
#define PROC_AUXV_MAX 256
-#if __ELF_WORD_SIZE == 64
+#ifdef PS_ARCH_HAS_FREEBSD32
static const char *elf32_sv_names[] = {
"Linux ELF32",
"FreeBSD ELF32",
@@ -2464,7 +2464,7 @@
free(auxv32);
return (auxv);
}
-#endif /* __ELF_WORD_SIZE == 64 */
+#endif /* PS_ARCH_HAS_FREEBSD32 */
static Elf_Auxinfo *
procstat_getauxv_sysctl(pid_t pid, unsigned int *cntp)
@@ -2473,7 +2473,7 @@
int name[4];
size_t len;
-#if __ELF_WORD_SIZE == 64
+#ifdef PS_ARCH_HAS_FREEBSD32
if (is_elf32_sysctl(pid))
return (procstat_getauxv32_sysctl(pid, cntp));
#endif
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 11, 10:29 PM (21 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15758440
Default Alt Text
D42201.diff (1 KB)
Attached To
Mode
D42201: libprocstat: improve conditional for 32-bit compat
Attached
Detach File
Event Timeline
Log In to Comment