Remove unnecessary FreeBSD #include
PATCH 1/1 Remove unnecessary FreeBSD #include
sys/param.h was included to define __FreeBSD_version, but the conditional using it was removed by commit d05ef160453e98546a4197496dc8a3cb2defac53 (Brad Smith, "Allow clock_gettime() monotonic clock to be utilized on more OS's"), so the include is no longer needed here.
--- include/qemu/timer.h | 4 ---- 1 file changed, 4 deletions(-)
include/qemu/timer.h +0 -4
@@ -5,10 +5,6 @@#include "qemu/main-loop.h" #include "qemu/notify.h" -#ifdef __FreeBSD__ -#include <sys/param.h> -#endif -/* timers */ #define SCALE_MS 1000000
Signature · 1 line
1.7.11.5
Quoted 6 lines · Ed Maste
sys/param.hwas included to define__FreeBSD_version, but the conditional using it was removed by commitd05ef160453e98546a4197496dc8a3cb2defac53(Brad Smith, "Allowclock_gettime()monotonic clock to be utilized on more OS's"), so the include is no longer needed here.Signed-off-by Ed Maste <[email protected]>
CCing qemu-trivial for this.
(Our other use of __FreeBSD_version is preceded by a direct include of sys/param.h in translate-all.c.)
thanks
-- PMM
Quoted 22 lines
--- include/qemu/timer.h | 4 ---- 1 file changed, 4 deletions(-)include/qemu/timer.h +0
-5@@ -5,10 +5,6 @@#include "qemu/main-loop.h" #include "qemu/notify.h" -#ifdef __FreeBSD__ -#include <sys/param.h> -#endif -/* timers */ #define SCALE_MS 1000000 --1.7.11.5
Quoted 2 lines · Peter Maydell
(Our other use of
__FreeBSD_versionis preceded by a direct include ofsys/param.hintranslate-all.c.)
I noticed that one. It's checking for __FreeBSD_version >= 700104, which corresponds to a point in time a little before the 7.1 release. Since that's no longer supported the conditional can be removed at some point, although there's no urgency as it doesn't cause any trouble. The timer.h one resulted in a broken build, since it ended up bringing in a round_page macro definition which conflicted with a function of the same name in mac_{old,new}world.c.
Anthony Liguori
AppliedApplied. Thanks.
Regards,
Anthony Liguori