Index: translate-all.c =================================================================== --- translate-all.c (revision 4638) +++ translate-all.c (working copy) @@ -18,6 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include +#include #include #include #include Index: target-cris/translate.c =================================================================== --- target-cris/translate.c (revision 4638) +++ target-cris/translate.c (working copy) @@ -25,6 +25,7 @@ */ #include +#include #include #include #include Index: softmmu_header.h =================================================================== --- softmmu_header.h (revision 4638) +++ softmmu_header.h (working copy) @@ -17,6 +17,8 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include #if DATA_SIZE == 8 #define SUFFIX q #define USUFFIX q Index: target-sparc/translate.c =================================================================== --- target-sparc/translate.c (revision 4638) +++ target-sparc/translate.c (working copy) @@ -20,6 +20,7 @@ */ #include +#include #include #include #include Index: target-m68k/helper.c =================================================================== --- target-m68k/helper.c (revision 4638) +++ target-m68k/helper.c (working copy) @@ -19,6 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include Index: target-m68k/translate.c =================================================================== --- target-m68k/translate.c (revision 4638) +++ target-m68k/translate.c (working copy) @@ -19,6 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include +#include #include #include #include Index: linux-user/signal.c =================================================================== --- linux-user/signal.c (revision 4638) +++ linux-user/signal.c (working copy) @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include @@ -548,10 +549,6 @@ return ret; } -#ifndef offsetof -#define offsetof(type, field) ((size_t) &((type *)0)->field) -#endif - static inline int copy_siginfo_to_user(target_siginfo_t *tinfo, const target_siginfo_t *info) { Index: target-mips/translate.c =================================================================== --- target-mips/translate.c (revision 4638) +++ target-mips/translate.c (working copy) @@ -21,6 +21,7 @@ */ #include +#include #include #include #include Index: tcg/arm/tcg-target.c =================================================================== --- tcg/arm/tcg-target.c (revision 4638) +++ tcg/arm/tcg-target.c (working copy) @@ -21,6 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ + +#include + const char *tcg_target_reg_names[TCG_TARGET_NB_REGS] = { "%r0", "%r1", Index: tcg/ppc/tcg-target.c =================================================================== --- tcg/ppc/tcg-target.c (revision 4638) +++ tcg/ppc/tcg-target.c (working copy) @@ -22,6 +22,8 @@ * THE SOFTWARE. */ +#include + static uint8_t *tb_ret_addr; #define FAST_PATH Index: tcg/hppa/tcg-target.c =================================================================== --- tcg/hppa/tcg-target.c (revision 4638) +++ tcg/hppa/tcg-target.c (working copy) @@ -22,6 +22,8 @@ * THE SOFTWARE. */ +#include + static const char * const tcg_target_reg_names[TCG_TARGET_NB_REGS] = { "%r0", "%r1", Index: tcg/i386/tcg-target.c =================================================================== --- tcg/i386/tcg-target.c (revision 4638) +++ tcg/i386/tcg-target.c (working copy) @@ -21,6 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ + +#include + const char *tcg_target_reg_names[TCG_TARGET_NB_REGS] = { "%eax", "%ecx", Index: tcg/x86_64/tcg-target.c =================================================================== --- tcg/x86_64/tcg-target.c (revision 4638) +++ tcg/x86_64/tcg-target.c (working copy) @@ -21,6 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ + +#include + const char *tcg_target_reg_names[TCG_TARGET_NB_REGS] = { "%rax", "%rcx", Index: tcg/sparc/tcg-target.c =================================================================== --- tcg/sparc/tcg-target.c (revision 4638) +++ tcg/sparc/tcg-target.c (working copy) @@ -22,6 +22,8 @@ * THE SOFTWARE. */ +#include + static const char * const tcg_target_reg_names[TCG_TARGET_NB_REGS] = { "%g0", "%g1", Index: cpu-exec.c =================================================================== --- cpu-exec.c (revision 4638) +++ cpu-exec.c (working copy) @@ -17,6 +17,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include "config.h" #define CPU_NO_GLOBAL_REGS #include "exec.h" Index: block-qcow2.c =================================================================== --- block-qcow2.c (revision 4638) +++ block-qcow2.c (working copy) @@ -21,6 +21,8 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ + +#include #include "qemu-common.h" #include "block_int.h" #include @@ -59,10 +61,6 @@ #define REFCOUNT_SHIFT 1 /* refcount size is 2 bytes */ -#ifndef offsetof -#define offsetof(type, field) ((size_t) &((type *)0)->field) -#endif - typedef struct QCowHeader { uint32_t magic; uint32_t version; Index: exec.c =================================================================== --- exec.c (revision 4638) +++ exec.c (working copy) @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include Index: monitor.c =================================================================== --- monitor.c (revision 4638) +++ monitor.c (working copy) @@ -21,6 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ +#include #include "hw/hw.h" #include "hw/usb.h" #include "hw/pcmcia.h" @@ -43,10 +44,6 @@ //#define DEBUG //#define DEBUG_COMPLETION -#ifndef offsetof -#define offsetof(type, field) ((size_t) &((type *)0)->field) -#endif - /* * Supported types: * Index: exec-all.h =================================================================== --- exec-all.h (revision 4638) +++ exec-all.h (working copy) @@ -275,10 +275,6 @@ TranslationBlock *tb_find_pc(unsigned long pc_ptr); -#ifndef offsetof -#define offsetof(type, field) ((size_t) &((type *)0)->field) -#endif - #if defined(_WIN32) #define ASM_DATA_SECTION ".section \".data\"\n" #define ASM_PREVIOUS_SECTION ".section .text\n" Index: target-i386/helper.c =================================================================== --- target-i386/helper.c (revision 4638) +++ target-i386/helper.c (working copy) @@ -18,6 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include +#include #include #include #include Index: target-i386/op_helper.c =================================================================== --- target-i386/op_helper.c (revision 4638) +++ target-i386/op_helper.c (working copy) @@ -18,6 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define CPU_NO_GLOBAL_REGS +#include #include "exec.h" #include "host-utils.h" Index: target-i386/translate.c =================================================================== --- target-i386/translate.c (revision 4638) +++ target-i386/translate.c (working copy) @@ -18,6 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include +#include #include #include #include Index: target-arm/helper.c =================================================================== --- target-arm/helper.c (revision 4638) +++ target-arm/helper.c (working copy) @@ -1,4 +1,5 @@ #include +#include #include #include Index: target-arm/translate.c =================================================================== --- target-arm/translate.c (revision 4638) +++ target-arm/translate.c (working copy) @@ -20,6 +20,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include +#include #include #include #include