Fix compilation issues under clang
clang defaults to c99 so remove inline statements (http://clang.llvm.org/compatibility.html#inline ) on functions shared across different translation units. clang's linker doesn't like major numbers over 255 so change how SOREL is generated in Makefile.am.
This commit is contained in:
@@ -305,13 +305,13 @@ void iscsi_set_error(struct iscsi_context *iscsi, const char *error_string,
|
||||
struct scsi_iovector *iscsi_get_scsi_task_iovector_in(struct iscsi_context *iscsi, struct iscsi_in_pdu *in);
|
||||
struct scsi_iovector *iscsi_get_scsi_task_iovector_out(struct iscsi_context *iscsi, struct iscsi_pdu *pdu);
|
||||
|
||||
inline void* iscsi_malloc(struct iscsi_context *iscsi, size_t size);
|
||||
inline void* iscsi_zmalloc(struct iscsi_context *iscsi, size_t size);
|
||||
inline void* iscsi_realloc(struct iscsi_context *iscsi, void* ptr, size_t size);
|
||||
inline void iscsi_free(struct iscsi_context *iscsi, void* ptr);
|
||||
inline char* iscsi_strdup(struct iscsi_context *iscsi, const char* str);
|
||||
inline void* iscsi_szmalloc(struct iscsi_context *iscsi, size_t size);
|
||||
inline void iscsi_sfree(struct iscsi_context *iscsi, void* ptr);
|
||||
void* iscsi_malloc(struct iscsi_context *iscsi, size_t size);
|
||||
void* iscsi_zmalloc(struct iscsi_context *iscsi, size_t size);
|
||||
void* iscsi_realloc(struct iscsi_context *iscsi, void* ptr, size_t size);
|
||||
void iscsi_free(struct iscsi_context *iscsi, void* ptr);
|
||||
char* iscsi_strdup(struct iscsi_context *iscsi, const char* str);
|
||||
void* iscsi_szmalloc(struct iscsi_context *iscsi, size_t size);
|
||||
void iscsi_sfree(struct iscsi_context *iscsi, void* ptr);
|
||||
|
||||
unsigned long crc32c(char *buf, int len);
|
||||
|
||||
|
||||
@@ -1074,10 +1074,10 @@ EXTERN struct scsi_task *scsi_cdb_writeverify16(uint64_t lba, uint32_t xferlen,
|
||||
|
||||
void *scsi_malloc(struct scsi_task *task, size_t size);
|
||||
|
||||
inline uint32_t scsi_get_uint32(const unsigned char *c);
|
||||
inline uint16_t scsi_get_uint16(const unsigned char *c);
|
||||
inline void scsi_set_uint32(unsigned char *c, uint32_t val);
|
||||
inline void scsi_set_uint16(unsigned char *c, uint16_t val);
|
||||
uint32_t scsi_get_uint32(const unsigned char *c);
|
||||
uint16_t scsi_get_uint16(const unsigned char *c);
|
||||
void scsi_set_uint32(unsigned char *c, uint32_t val);
|
||||
void scsi_set_uint16(unsigned char *c, uint16_t val);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user