open-iscsi-2.0.874-musl-ethtool-compat.patch 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. From: Anthony G. Basiel <blueness@gentoo.org>
  2. diff -Naur open-iscsi-2.0.874.orig/iscsiuio/src/unix/libs/bnx2x.c open-iscsi-2.0.874/iscsiuio/src/unix/libs/bnx2x.c
  3. --- open-iscsi-2.0.874.orig/iscsiuio/src/unix/libs/bnx2x.c 2016-09-29 18:33:24.000000000 +0000
  4. +++ open-iscsi-2.0.874/iscsiuio/src/unix/libs/bnx2x.c 2017-01-03 21:45:47.504035833 +0000
  5. @@ -42,7 +42,7 @@
  6. #include <arpa/inet.h>
  7. #include <linux/types.h> /* Needed for linux/ethtool.h on RHEL 5.x */
  8. #include <linux/sockios.h>
  9. -#include <linux/ethtool.h>
  10. +#include "ethtool-compat.h"
  11. #include <sys/mman.h>
  12. #include <sys/ioctl.h>
  13. #include <sys/types.h>
  14. diff -Naur open-iscsi-2.0.874.orig/iscsiuio/src/unix/libs/ethtool-compat.h open-iscsi-2.0.874/iscsiuio/src/unix/libs/ethtool-compat.h
  15. --- open-iscsi-2.0.874.orig/iscsiuio/src/unix/libs/ethtool-compat.h 1970-01-01 00:00:00.000000000 +0000
  16. +++ open-iscsi-2.0.874/iscsiuio/src/unix/libs/ethtool-compat.h 2017-01-03 21:45:23.016034980 +0000
  17. @@ -0,0 +1,51 @@
  18. +/*
  19. + * ethtool-compat.h: adopted from
  20. + # ethtool.h: Defines for Linux ethtool.
  21. + *
  22. + * Copyright (C) 1998 David S. Miller (davem@redhat.com)
  23. + * Copyright 2001 Jeff Garzik <jgarzik@pobox.com>
  24. + * Portions Copyright 2001 Sun Microsystems (thockin@sun.com)
  25. + * Portions Copyright 2002 Intel (eli.kupermann@intel.com,
  26. + * christopher.leech@intel.com,
  27. + * scott.feldman@intel.com)
  28. + * Portions Copyright (C) Sun Microsystems 2008
  29. + */
  30. +
  31. +#include <linux/types.h>
  32. +#include <netinet/if_ether.h>
  33. +
  34. +#define ETHTOOL_FWVERS_LEN 32
  35. +#define ETHTOOL_BUSINFO_LEN 32
  36. +#define ETHTOOL_EROMVERS_LEN 32
  37. +
  38. +struct ethtool_drvinfo {
  39. + __u32 cmd;
  40. + char driver[32];
  41. + char version[32];
  42. + char fw_version[ETHTOOL_FWVERS_LEN];
  43. + char bus_info[ETHTOOL_BUSINFO_LEN];
  44. + char erom_version[ETHTOOL_EROMVERS_LEN];
  45. + char reserved2[12];
  46. + __u32 n_priv_flags;
  47. + __u32 n_stats;
  48. + __u32 testinfo_len;
  49. + __u32 eedump_len;
  50. + __u32 regdump_len;
  51. +};
  52. +
  53. +struct ethtool_tcpip4_spec {
  54. + __be32 ip4src;
  55. + __be32 ip4dst;
  56. + __be16 psrc;
  57. + __be16 pdst;
  58. + __u8 tos;
  59. +};
  60. +
  61. +struct ethtool_ah_espip4_spec {
  62. + __be32 ip4src;
  63. + __be32 ip4dst;
  64. + __be32 spi;
  65. + __u8 tos;
  66. +};
  67. +
  68. +#define ETHTOOL_GDRVINFO 0x00000003 /* Get driver info. */