Skip to content

Instantly share code, notes, and snippets.

@kaworu
Created April 2, 2014 10:56
Show Gist options
  • Save kaworu/9931919 to your computer and use it in GitHub Desktop.
Save kaworu/9931919 to your computer and use it in GitHub Desktop.
sysctl.c: use the correct (unsigned) type size for CTLTYPE_U64
--- sbin/sysctl/sysctl.c.orig 2014-04-02 12:54:01.000000000 +0200
+++ sbin/sysctl/sysctl.c 2014-04-02 12:54:33.000000000 +0200
@@ -632,7 +632,7 @@
[CTLTYPE_LONG] = sizeof(long),
[CTLTYPE_ULONG] = sizeof(u_long),
[CTLTYPE_S64] = sizeof(int64_t),
- [CTLTYPE_U64] = sizeof(int64_t),
+ [CTLTYPE_U64] = sizeof(uint64_t),
};
/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment