1*bed243d3SAndroid Build Coastguard Worker /*===---- __stddef_offsetof.h - Definition of offsetof ---------------------=== 2*bed243d3SAndroid Build Coastguard Worker * 3*bed243d3SAndroid Build Coastguard Worker * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*bed243d3SAndroid Build Coastguard Worker * See https://llvm.org/LICENSE.txt for license information. 5*bed243d3SAndroid Build Coastguard Worker * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*bed243d3SAndroid Build Coastguard Worker * 7*bed243d3SAndroid Build Coastguard Worker *===-----------------------------------------------------------------------=== 8*bed243d3SAndroid Build Coastguard Worker */ 9*bed243d3SAndroid Build Coastguard Worker 10*bed243d3SAndroid Build Coastguard Worker /* 11*bed243d3SAndroid Build Coastguard Worker * When -fbuiltin-headers-in-system-modules is set this is a non-modular header 12*bed243d3SAndroid Build Coastguard Worker * and needs to behave as if it was textual. 13*bed243d3SAndroid Build Coastguard Worker */ 14*bed243d3SAndroid Build Coastguard Worker #if !defined(offsetof) || \ 15*bed243d3SAndroid Build Coastguard Worker (__has_feature(modules) && !__building_module(_Builtin_stddef)) 16*bed243d3SAndroid Build Coastguard Worker #define offsetof(t, d) __builtin_offsetof(t, d) 17*bed243d3SAndroid Build Coastguard Worker #endif 18