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.

42 lines
1.3 KiB

  1. From ad65af7dab9b8d8033fd09d8031cc774a6fbf768 Mon Sep 17 00:00:00 2001
  2. From: Godbach <nylzhaowei@gmail.com>
  3. Date: Mon, 28 Jul 2014 17:31:57 +0800
  4. Subject: [PATCH 1/3] BUG/MINOR: server: move the directive #endif to the end
  5. of file
  6. If a source file includes proto/server.h twice or more, redefinition errors will
  7. be triggered for such inline functions as server_throttle_rate(),
  8. server_is_draining(), srv_adm_set_maint() and so on. Just move #endif directive
  9. to the end of file to solve this issue.
  10. Signed-off-by: Godbach <nylzhaowei@gmail.com>
  11. (cherry picked from commit e468d55998e134dac1b18d5d9d075ffd5691c827)
  12. ---
  13. include/proto/server.h | 4 ++--
  14. 1 file changed, 2 insertions(+), 2 deletions(-)
  15. diff --git a/include/proto/server.h b/include/proto/server.h
  16. index 9893266..71c8b13 100644
  17. --- a/include/proto/server.h
  18. +++ b/include/proto/server.h
  19. @@ -54,8 +54,6 @@ static void inline srv_set_sess_last(struct server *s)
  20. s->counters.last_sess = now.tv_sec;
  21. }
  22. -#endif /* _PROTO_SERVER_H */
  23. -
  24. /*
  25. * Registers the server keyword list <kwl> as a list of valid keywords for next
  26. * parsing sessions.
  27. @@ -200,6 +198,8 @@ static inline void srv_adm_set_ready(struct server *s)
  28. srv_clr_admin_flag(s, SRV_ADMF_FMAINT);
  29. }
  30. +#endif /* _PROTO_SERVER_H */
  31. +
  32. /*
  33. * Local variables:
  34. * c-indent-level: 8
  35. --
  36. 1.8.5.5