如何解决gcc和g ++冲突?

时间:2019-07-16 12:53:41

标签: android kernel

我正在使用cpp编译内核的某些部分。头文件中遇到错误。

枚举binder_driver_return_protocol {

    BR_ERROR = _IOR('r', 0, __s32),
    /*
     * int: error code
     */

    BR_OK = _IO('r', 1),
    /* No parameters! */

    BR_TRANSACTION_SEC_CTX = _IOR('r', 2,
                                  struct binder_transaction_data_secctx),
    /*
     * binder_transaction_data_secctx: the received command.
     */
    BR_TRANSACTION = _IOR('r', 2, struct binder_transaction_data),
    BR_REPLY = _IOR('r', 3, struct binder_transaction_data),
    /*
     * binder_transaction_data: the received command.
     */

    BR_ACQUIRE_RESULT = _IOR('r', 4, __s32),
    /*
     * not currently supported

我收到以下错误:

./include/uapi/linux/android/binder.h:369:32: error: expected primary-expression before ',' token
  BR_ERROR = _IOR('r', 0, __s32),
                                ^
./include/uapi/linux/android/binder.h:374:21: error: expected primary-expression before ',' token
  BR_OK = _IO('r', 1),
                     ^
./include/uapi/linux/android/binder.h:378:49: error: expected primary-expression before ',' token
           struct binder_transaction_data_secctx),
                                                 ^
./include/uapi/linux/android/binder.h:382:63: error: expected primary-expression before ',' token
  BR_TRANSACTION = _IOR('r', 2, struct binder_transaction_data),

0 个答案:

没有答案