diff --git a/proc/namespace.c b/proc/namespace.c index cd4f47d5..59079dab 100644 --- a/proc/namespace.c +++ b/proc/namespace.c @@ -103,7 +103,7 @@ PROCPS_EXPORT int procps_ns_read_pid( for (i=0; i < PROCPS_NS_COUNT; i++) { snprintf(path, NSPATHLEN, "/proc/%d/ns/%s", pid, ns_names[i]); if (0 == stat(path, &st)) - nsp->ns[i] = (long)st.st_ino; + nsp->ns[i] = (unsigned long)st.st_ino; else nsp->ns[i] = 0; } diff --git a/proc/namespace.h b/proc/namespace.h index 2aaea5c0..2885d8d5 100644 --- a/proc/namespace.h +++ b/proc/namespace.h @@ -36,7 +36,7 @@ enum namespace_type { }; struct procps_namespaces { - long ns[PROCPS_NS_COUNT]; + unsigned long ns[PROCPS_NS_COUNT]; }; const char *procps_ns_get_name(const int id);