You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
2.5 KiB

  1. From 675ac7b4b64d398de8a61e9c713383b8c0d9071f Mon Sep 17 00:00:00 2001
  2. From: Florian Fainelli <f.fainelli@gmail.com>
  3. Date: Tue, 20 Jun 2017 20:06:36 -0700
  4. Subject: [PATCH] nopoll: * [fix] Avoid clashes with isset() from sys/param.h
  5. ---
  6. src/nopoll_io.c | 4 ++--
  7. src/nopoll_loop.c | 4 ++--
  8. src/nopoll_private.h | 4 ++--
  9. 3 files changed, 6 insertions(+), 6 deletions(-)
  10. diff --git a/src/nopoll_io.c b/src/nopoll_io.c
  11. index 036aa2c1c685..b3e48c2385d0 100644
  12. --- a/src/nopoll_io.c
  13. +++ b/src/nopoll_io.c
  14. @@ -204,8 +204,8 @@ noPollIoEngine * nopoll_io_get_engine (noPollCtx * ctx, noPollIoEngineType engin
  15. engine->destroy = nopoll_io_wait_select_destroy;
  16. engine->clear = nopoll_io_wait_select_clear;
  17. engine->wait = nopoll_io_wait_select_wait;
  18. - engine->addto = nopoll_io_wait_select_add_to;
  19. - engine->isset = nopoll_io_wait_select_is_set;
  20. + engine->add_to = nopoll_io_wait_select_add_to;
  21. + engine->is_set = nopoll_io_wait_select_is_set;
  22. /* call to create the object */
  23. engine->ctx = ctx;
  24. diff --git a/src/nopoll_loop.c b/src/nopoll_loop.c
  25. index f58b8133b79a..60112f8dbf58 100644
  26. --- a/src/nopoll_loop.c
  27. +++ b/src/nopoll_loop.c
  28. @@ -64,7 +64,7 @@ nopoll_bool nopoll_loop_register (noPollCtx * ctx, noPollConn * conn, noPollPtr
  29. /* register the connection socket */
  30. /* nopoll_log (ctx, NOPOLL_LEVEL_DEBUG, "Adding socket id: %d", conn->session);*/
  31. - if (! ctx->io_engine->addto (conn->session, ctx, conn, ctx->io_engine->io_object)) {
  32. + if (! ctx->io_engine->add_to (conn->session, ctx, conn, ctx->io_engine->io_object)) {
  33. /* remove this connection from registry */
  34. nopoll_ctx_unregister_conn (ctx, conn);
  35. @@ -109,7 +109,7 @@ nopoll_bool nopoll_loop_process (noPollCtx * ctx, noPollConn * conn, noPollPtr u
  36. int * conn_changed = (int *) user_data;
  37. /* check if the connection have something to notify */
  38. - if (ctx->io_engine->isset (ctx, conn->session, ctx->io_engine->io_object)) {
  39. + if (ctx->io_engine->is_set (ctx, conn->session, ctx->io_engine->io_object)) {
  40. /* call to notify action according to role */
  41. switch (conn->role) {
  42. diff --git a/src/nopoll_private.h b/src/nopoll_private.h
  43. index 82fd27bb7fba..cd895d1e3ffd 100644
  44. --- a/src/nopoll_private.h
  45. +++ b/src/nopoll_private.h
  46. @@ -340,8 +340,8 @@ struct _noPollIoEngine {
  47. noPollIoMechDestroy destroy;
  48. noPollIoMechClear clear;
  49. noPollIoMechWait wait;
  50. - noPollIoMechAddTo addto;
  51. - noPollIoMechIsSet isset;
  52. + noPollIoMechAddTo add_to;
  53. + noPollIoMechIsSet is_set;
  54. };
  55. struct _noPollMsg {
  56. --
  57. 2.11.0