From b48e7fc84238b8e955d11934875ead8aa088f13c Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Sun, 13 Sep 2009 01:30:38 +0000 Subject: [PATCH] Fix Device Kit build in debug mode. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33110 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/os/device/Joystick.h | 4 ++++ headers/private/device/JoystickTweaker.h | 4 ++++ src/kits/device/JoystickTweaker.cpp | 6 +++--- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/headers/os/device/Joystick.h b/headers/os/device/Joystick.h index c4564e252c..1c3baecddc 100644 --- a/headers/os/device/Joystick.h +++ b/headers/os/device/Joystick.h @@ -9,6 +9,10 @@ #include #include +#if DEBUG +#include +#endif + class BList; class BString; class _BJoystickTweaker; diff --git a/headers/private/device/JoystickTweaker.h b/headers/private/device/JoystickTweaker.h index 86fb334d46..f311c3ce89 100644 --- a/headers/private/device/JoystickTweaker.h +++ b/headers/private/device/JoystickTweaker.h @@ -11,6 +11,10 @@ #include #include +#if DEBUG +#include +#endif + #define DEVICEPATH "/dev/joystick/" #define JOYSTICKPATH "/boot/home/config/settings/joysticks/" diff --git a/src/kits/device/JoystickTweaker.cpp b/src/kits/device/JoystickTweaker.cpp index 76155d31f1..50bbc4e789 100644 --- a/src/kits/device/JoystickTweaker.cpp +++ b/src/kits/device/JoystickTweaker.cpp @@ -31,10 +31,10 @@ LOG(const char *fmt, ...) va_start(ap, fmt); vsprintf(buf, fmt, ap); va_end(ap); - fputs(buf, BJoystick::sLogFile); fflush(BJoystick::sLogFile); + fputs(buf, _BJoystickTweaker::sLogFile); fflush(_BJoystickTweaker::sLogFile); } # define LOG_ERR(text...) LOG(text) -FILE *BJoystick::sLogFile = NULL; +FILE *_BJoystickTweaker::sLogFile = NULL; #else # define LOG(text...) # define LOG_ERR(text...) fprintf(stderr, text) @@ -184,7 +184,7 @@ _BJoystickTweaker::_BuildFromJoystickDesc(char *string, _joystick_info* info) str.RemoveFirst("num_sticks = "); info->num_sticks = atoi(str.String()); } else { - LOG("Path = %s\n", str->String()); + LOG("Path = %s\n", str.String()); } }