patch-platform_OpenBSD_sm_mbuf_c 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. $OpenBSD: patch-platform_OpenBSD_sm_mbuf_c,v 1.8 2016/04/05 10:21:22 sthen Exp $
  2. --- platform/OpenBSD/sm_mbuf.c.orig Mon Nov 2 10:29:12 2009
  3. +++ platform/OpenBSD/sm_mbuf.c Tue Apr 5 11:18:29 2016
  4. @@ -29,9 +29,11 @@
  5. */
  6. #include <sys/param.h>
  7. +#include <sys/queue.h>
  8. #include <sys/mbuf.h>
  9. #include <sys/sysctl.h>
  10. #include <sys/errno.h>
  11. +#include <sys/pool.h>
  12. #include <errno.h>
  13. #include <string.h>
  14. @@ -64,7 +66,7 @@ get_mbuf(char *symon_buf, int maxlen, struct stream *s
  15. {
  16. struct mbstat mbstat;
  17. int npools;
  18. - struct pool pool, mbpool, mclpool;
  19. + struct kinfo_pool pool, mbpool, mclpool;
  20. int mib[4];
  21. size_t size;
  22. int i;
  23. @@ -111,7 +113,7 @@ get_mbuf(char *symon_buf, int maxlen, struct stream *s
  24. warning("mbuf(%.200s) failed (sysctl() %.200s)", st->arg, strerror(errno));
  25. return (0);
  26. }
  27. - if (!strcmp(name, "mbpl")) {
  28. + if (!strcmp(name, "mbpl") || !strcmp(name, "mbufpl")) {
  29. bcopy(&pool, &mbpool, sizeof(pool));
  30. flag |= (1 << 0);
  31. } else if (!strcmp(name, "mclpl")) {