diff --git a/0002-avoid-ssize_t.patch b/0002-avoid-ssize_t.patch new file mode 100644 index 0000000000000000000000000000000000000000..c20c1a7ac8927260746aa8f76fbc199528d6debc --- /dev/null +++ b/0002-avoid-ssize_t.patch @@ -0,0 +1,32 @@ +diff --git a/master/globals.h b/master/globals.h +index 840a160..23eaaaf 100644 +--- a/master/globals.h ++++ b/master/globals.h +@@ -263,7 +263,7 @@ unsigned int ec_master_count(void); + void ec_print_data(const uint8_t *, size_t); + void ec_print_data_diff(const uint8_t *, const uint8_t *, size_t); + size_t ec_state_string(uint8_t, char *, uint8_t); +-ssize_t ec_mac_print(const uint8_t *, char *); ++size_t ec_mac_print(const uint8_t *, char *); + int ec_mac_is_zero(const uint8_t *); + + ec_master_t *ecrt_request_master_err(unsigned int); +diff --git a/master/module.c b/master/module.c +index 573a694..250f612 100644 +--- a/master/module.c ++++ b/master/module.c +@@ -239,12 +239,12 @@ int ec_mac_equal( + * + * \return number of bytes written. + */ +-ssize_t ec_mac_print( ++size_t ec_mac_print( + const uint8_t *mac, /**< MAC address */ + char *buffer /**< Target buffer. */ + ) + { +- off_t off = 0; ++ size_t off = 0; + unsigned int i; + + for (i = 0; i < ETH_ALEN; i++) { diff --git a/ethercat-igh.spec b/ethercat-igh.spec index 35bacc7917907ee6d801c278b1987e577cc65ca7..8c432acc7f4eb90113674b507c1c43a6d8b21568 100644 --- a/ethercat-igh.spec +++ b/ethercat-igh.spec @@ -13,6 +13,7 @@ BuildRequires: make BuildRequires: patchelf BuildRequires: kernel-headers, kernel-devel Patch0: 0001-ethercat-Fix-ethercat-tool-compilation.patch +Patch1: 0002-avoid-ssize_t.patch %description This is an open-source EtherCAT master implementation for Linux. @@ -21,6 +22,7 @@ This is an open-source EtherCAT master implementation for Linux. %setup -q -n ethercat-e1000e-%{version} %patch0 -p1 +%patch1 -p1 CPPFLAGS="${CPPFLAGS} -Doff64_t=__off64_t";export CPPFLAGS; ./bootstrap @@ -108,3 +110,7 @@ depmod -a * Fri Feb 24 2023 xxhong - 5.10-5 - add 0001-ethercat-Fix-ethercat-tool-compilation.patch - remove 8139too,e100,e1000,ccat,igb +%changelog +* Fri July 28 2023 zhixing - 5.10-5 +- ethercat: modified ssize_t into size_t +- add 0002-avoid-ssize_t.patch for synchronize the modification of the master branch