Bug 1276927: Define HAVE_ANDROID_OS before including 'android_filesystem_config.h', r=fabrice
The preprocessor token HAVE_ANDROID_OS configures 'android_filesystem_config.h'
to include the correct header files from the environment.
MozReview-Commit-ID: oKwdjzDjij
--- a/dom/system/gonk/moz.build
+++ b/dom/system/gonk/moz.build
@@ -123,16 +123,18 @@ if CONFIG['MOZ_B2G_RIL']:
'DataCallInterfaceService.js',
'DataCallInterfaceService.manifest',
'RadioInterfaceLayer.js',
'RadioInterfaceLayer.manifest',
]
include('/ipc/chromium/chromium-config.mozbuild')
+DEFINES['HAVE_ANDROID_OS'] = True
+
LOCAL_INCLUDES += [
'/dom/base',
'/dom/bluetooth/common',
'/dom/geolocation',
'/dom/wifi',
]
FINAL_LIBRARY = 'xul'
--- a/ipc/chromium/moz.build
+++ b/ipc/chromium/moz.build
@@ -130,16 +130,18 @@ if os_linux:
'src/base/time_posix.cc',
]
if CONFIG['OS_TARGET'] == 'Android':
UNIFIED_SOURCES += [
'src/base/message_pump_android.cc',
]
DEFINES['ANDROID'] = True
DEFINES['_POSIX_MONOTONIC_CLOCK'] = 0
+ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
+ DEFINES['HAVE_ANDROID_OS'] = True
if os_bsd or os_linux:
if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
SOURCES += [
'src/base/message_pump_glib.cc',
]
if CONFIG['MOZ_ENABLE_QT']:
SOURCES += [
--- a/security/sandbox/linux/broker/moz.build
+++ b/security/sandbox/linux/broker/moz.build
@@ -11,16 +11,20 @@ EXPORTS.mozilla += [
]
SOURCES += [
'SandboxBroker.cpp',
'SandboxBrokerCommon.cpp',
'SandboxBrokerPolicyFactory.cpp',
]
+if CONFIG['OS_TARGET'] == 'Android':
+ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
+ DEFINES['HAVE_ANDROID_OS'] = True
+
LOCAL_INCLUDES += [
'/security/sandbox/linux', # SandboxLogging.h
'/security/sandbox/linux/common', # SandboxInfo.h
]
# Need this for mozilla::ipc::FileDescriptor etc.
include('/ipc/chromium/chromium-config.mozbuild')
--- a/widget/gonk/GonkPermission.cpp
+++ b/widget/gonk/GonkPermission.cpp
@@ -9,22 +9,26 @@
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+#include "GonkPermission.h"
#include <binder/IPCThreadState.h>
#include <binder/ProcessState.h>
#include <binder/IServiceManager.h>
#include <binder/IPermissionController.h>
+
+#ifndef HAVE_ANDROID_OS
+#define HAVE_ANDROID_OS 1
+#endif
#include <private/android_filesystem_config.h>
-#include "GonkPermission.h"
#include "mozilla/dom/ContentParent.h"
#include "mozilla/dom/TabParent.h"
#include "mozilla/SyncRunnable.h"
#include "nsIAppsService.h"
#include "mozIApplication.h"
#include "nsThreadUtils.h"
--- a/widget/gonk/nativewindow/moz.build
+++ b/widget/gonk/nativewindow/moz.build
@@ -92,16 +92,18 @@ include('/ipc/chromium/chromium-config.m
if CONFIG['ANDROID_VERSION'] >= '18':
LOCAL_INCLUDES += [
'%' + '%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [
'frameworks/native/opengl/include',
]
]
+DEFINES['HAVE_ANDROID_OS'] = True
+
# Suppress some GCC warnings being treated as errors:
# - about attributes on forward declarations for types that are already
# defined, which complains about an important MOZ_EXPORT for android::AString
if CONFIG['GNU_CC']:
CXXFLAGS += ['-Wno-error=attributes', '-Wno-overloaded-virtual']
FINAL_LIBRARY = 'xul'