diff options
-rw-r--r-- | hw/audio/pcspk.c | 2 | ||||
-rw-r--r-- | include/hw/timer/i8254.h | 8 | ||||
-rw-r--r-- | include/hw/timer/i8254_internal.h | 8 | ||||
-rw-r--r-- | linux-user/syscall.c | 2 |
4 files changed, 11 insertions, 9 deletions
diff --git a/hw/audio/pcspk.c b/hw/audio/pcspk.c index a7aa4e9c26..42a6f4885a 100644 --- a/hw/audio/pcspk.c +++ b/hw/audio/pcspk.c @@ -171,7 +171,7 @@ static void pcspk_initfn(Object *obj) memory_region_init_io(&s->ioport, OBJECT(s), &pcspk_io_ops, s, "pcspk", 1); - object_property_add_link(obj, "pit", TYPE_I8254, + object_property_add_link(obj, "pit", TYPE_PIT_COMMON, (Object **)&s->pit, qdev_prop_allow_set_link_before_realize, 0, &error_abort); diff --git a/include/hw/timer/i8254.h b/include/hw/timer/i8254.h index 434903348c..27a0fb6c51 100644 --- a/include/hw/timer/i8254.h +++ b/include/hw/timer/i8254.h @@ -37,6 +37,14 @@ typedef struct PITChannelInfo { int out; } PITChannelInfo; +#define TYPE_PIT_COMMON "pit-common" +#define PIT_COMMON(obj) \ + OBJECT_CHECK(PITCommonState, (obj), TYPE_PIT_COMMON) +#define PIT_COMMON_CLASS(klass) \ + OBJECT_CLASS_CHECK(PITCommonClass, (klass), TYPE_PIT_COMMON) +#define PIT_COMMON_GET_CLASS(obj) \ + OBJECT_GET_CLASS(PITCommonClass, (obj), TYPE_PIT_COMMON) + #define TYPE_I8254 "isa-pit" #define TYPE_KVM_I8254 "kvm-pit" diff --git a/include/hw/timer/i8254_internal.h b/include/hw/timer/i8254_internal.h index 61a1bfbc4e..e7cb7573ca 100644 --- a/include/hw/timer/i8254_internal.h +++ b/include/hw/timer/i8254_internal.h @@ -57,14 +57,6 @@ typedef struct PITCommonState { PITChannelState channels[3]; } PITCommonState; -#define TYPE_PIT_COMMON "pit-common" -#define PIT_COMMON(obj) \ - OBJECT_CHECK(PITCommonState, (obj), TYPE_PIT_COMMON) -#define PIT_COMMON_CLASS(klass) \ - OBJECT_CLASS_CHECK(PITCommonClass, (klass), TYPE_PIT_COMMON) -#define PIT_COMMON_GET_CLASS(obj) \ - OBJECT_GET_CLASS(PITCommonClass, (obj), TYPE_PIT_COMMON) - typedef struct PITCommonClass { ISADeviceClass parent_class; diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 28ee45a937..8bf6205dc2 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -5598,10 +5598,12 @@ static int target_to_host_fcntl_cmd(int cmd) case TARGET_F_SETOWN_EX: return F_SETOWN_EX; #endif +#ifdef F_SETPIPE_SZ case TARGET_F_SETPIPE_SZ: return F_SETPIPE_SZ; case TARGET_F_GETPIPE_SZ: return F_GETPIPE_SZ; +#endif default: return -TARGET_EINVAL; } |