diff --git a/usr.sbin/powerd/powerd.c b/usr.sbin/powerd/powerd.c index 13f515dc5e79..555218c831b8 100644 --- a/usr.sbin/powerd/powerd.c +++ b/usr.sbin/powerd/powerd.c @@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -167,8 +168,10 @@ static int set_freq(int freq) { - if (sysctl(freq_mib, 4, NULL, NULL, &freq, sizeof(freq))) - return (-1); + if (sysctl(freq_mib, 4, NULL, NULL, &freq, sizeof(freq))) { + if (errno != EPERM) + return (-1); + } return (0); }