fix_encrypt_collision.patch 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. Avoid namepspace collision with encrypt function from libc
  2. Upstream-Status: Pending
  3. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  4. Index: bluez-4.101/test/l2test.c
  5. ===================================================================
  6. --- bluez-4.101.orig/test/l2test.c
  7. +++ bluez-4.101/test/l2test.c
  8. @@ -107,7 +107,7 @@ static char *filename = NULL;
  9. static int rfcmode = 0;
  10. static int master = 0;
  11. static int auth = 0;
  12. -static int encrypt = 0;
  13. +static int encryption_request = 0;
  14. static int secure = 0;
  15. static int socktype = SOCK_SEQPACKET;
  16. static int linger = 0;
  17. @@ -340,7 +340,7 @@ static int do_connect(char *svr)
  18. opt |= L2CAP_LM_MASTER;
  19. if (auth)
  20. opt |= L2CAP_LM_AUTH;
  21. - if (encrypt)
  22. + if (encryption_request)
  23. opt |= L2CAP_LM_ENCRYPT;
  24. if (secure)
  25. opt |= L2CAP_LM_SECURE;
  26. @@ -475,7 +475,7 @@ static void do_listen(void (*handler)(in
  27. opt |= L2CAP_LM_MASTER;
  28. if (auth)
  29. opt |= L2CAP_LM_AUTH;
  30. - if (encrypt)
  31. + if (encryption_request)
  32. opt |= L2CAP_LM_ENCRYPT;
  33. if (secure)
  34. opt |= L2CAP_LM_SECURE;
  35. @@ -1407,7 +1407,7 @@ int main(int argc, char *argv[])
  36. break;
  37. case 'E':
  38. - encrypt = 1;
  39. + encryption_request = 1;
  40. break;
  41. case 'S':
  42. Index: bluez-4.101/test/rctest.c
  43. ===================================================================
  44. --- bluez-4.101.orig/test/rctest.c
  45. +++ bluez-4.101/test/rctest.c
  46. @@ -79,7 +79,7 @@ static char *filename = NULL;
  47. static int master = 0;
  48. static int auth = 0;
  49. -static int encrypt = 0;
  50. +static int encryption_request = 0;
  51. static int secure = 0;
  52. static int socktype = SOCK_STREAM;
  53. static int linger = 0;
  54. @@ -200,7 +200,7 @@ static int do_connect(const char *svr)
  55. opt |= RFCOMM_LM_MASTER;
  56. if (auth)
  57. opt |= RFCOMM_LM_AUTH;
  58. - if (encrypt)
  59. + if (encryption_request)
  60. opt |= RFCOMM_LM_ENCRYPT;
  61. if (secure)
  62. opt |= RFCOMM_LM_SECURE;
  63. @@ -291,7 +291,7 @@ static void do_listen(void (*handler)(in
  64. opt |= RFCOMM_LM_MASTER;
  65. if (auth)
  66. opt |= RFCOMM_LM_AUTH;
  67. - if (encrypt)
  68. + if (encryption_request)
  69. opt |= RFCOMM_LM_ENCRYPT;
  70. if (secure)
  71. opt |= RFCOMM_LM_SECURE;
  72. @@ -701,7 +701,7 @@ int main(int argc, char *argv[])
  73. break;
  74. case 'E':
  75. - encrypt = 1;
  76. + encryption_request = 1;
  77. break;
  78. case 'S':
  79. Index: bluez-4.101/src/textfile.h
  80. ===================================================================
  81. --- bluez-4.101.orig/src/textfile.h
  82. +++ bluez-4.101/src/textfile.h
  83. @@ -24,6 +24,8 @@
  84. #ifndef __TEXTFILE_H
  85. #define __TEXTFILE_H
  86. +#include <sys/types.h>
  87. +
  88. int create_dirs(const char *filename, const mode_t mode);
  89. int create_file(const char *filename, const mode_t mode);
  90. int create_name(char *buf, size_t size, const char *path,
  91. Index: bluez-4.101/test/attest.c
  92. ===================================================================
  93. --- bluez-4.101.orig/test/attest.c
  94. +++ bluez-4.101/test/attest.c
  95. @@ -34,6 +34,7 @@
  96. #include <termios.h>
  97. #include <sys/ioctl.h>
  98. #include <sys/socket.h>
  99. +#include <sys/select.h>
  100. #include <bluetooth/bluetooth.h>
  101. #include <bluetooth/rfcomm.h>