Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / sysutils / libgtop / patches / patch-sysdeps_solaris_procopenfiles.c
blob7658c735a11d6d53a8a161422e44c8df82a1e04a
1 $NetBSD$
3 Implement stub functions for Solaris to at least get the package to
4 build. Help filling them out with actual data would be very welcome.
6 --- sysdeps/solaris/procopenfiles.c.orig 2011-06-01 15:40:47.000000000 +0000
7 +++ sysdeps/solaris/procopenfiles.c
8 @@ -22,7 +22,10 @@
9 #include <config.h>
10 #include <glibtop.h>
11 #include <glibtop/error.h>
12 +#include <glibtop/procaffinity.h>
13 #include <glibtop/procopenfiles.h>
14 +#include <glibtop/procwd.h>
15 +#include <glibtop/sysinfo.h>
16 #include <sys/types.h>
17 #include <fcntl.h>
18 #include <sys/stat.h>
19 @@ -126,3 +129,46 @@ glibtop_get_proc_open_files_s (glibtop *
21 return (glibtop_open_files_entry*)g_array_free(entries, FALSE);
24 +/*
25 + * Stub functions, currently unimplemented on Solaris
26 + */
27 +void
28 +_glibtop_init_proc_wd_s (glibtop *server)
30 + server->sysdeps.proc_wd =
31 + (1 << GLIBTOP_PROC_WD_EXE) |
32 + (1 << GLIBTOP_PROC_WD_ROOT) |
33 + (1 << GLIBTOP_PROC_WD_NUMBER);
35 +char **
36 +glibtop_get_proc_wd_s (glibtop *server, glibtop_proc_wd *buf, pid_t pid)
38 + memset (buf, 0, sizeof (glibtop_proc_wd));
39 + return NULL;
42 +void
43 +_glibtop_init_proc_affinity_s(glibtop *server)
45 + server->sysdeps.proc_affinity =
46 + (1 << GLIBTOP_PROC_AFFINITY_NUMBER) |
47 + (1 << GLIBTOP_PROC_AFFINITY_ALL);
49 +guint16 *
50 +glibtop_get_proc_affinity_s(glibtop *server, glibtop_proc_affinity *buf, pid_t pid)
52 + memset(buf, 0, sizeof (glibtop_proc_affinity));
53 + return NULL;
56 +static glibtop_sysinfo sysinfo = { .flags = 0 };
58 +const glibtop_sysinfo *
59 +glibtop_get_sysinfo_s (glibtop *server)
61 + server->sysdeps.flags =
62 + (1L << GLIBTOP_SYSINFO_CPUINFO);
63 + glibtop_init_s (&server, GLIBTOP_SYSDEPS_CPU, 0);
64 + return NULL;