Menu

#8 BSD

0.2
closed-fixed
Aex Aey
None
5
2019-08-30
2018-10-27
No

Hi,
I tryied run pcapsipdump on FreeBSD box. But it wasn't possible.
I'm not so familiar in C/C++, but using "trials and errors method" I did it.
I attach files with my changes, maybe you want to use them.
Below I am describing the changes that I made.
Tested on FreeBSD 11.2 and 10.4 and Centos 6.10
In file pcapsipdump.h and calltable.h I add:

+#ifndef INT32_MAX
 #define INT32_MAX                (2147483647)
+#endif

On FreeBSD 11.2 the same definition exists in icluded files.

/usr/include/x86/_stdint.h:80:9: note: previous definition is here
#define INT32_MAX       0x7fffffff

In Makefile:

+UNAME_S := $(shell uname -s)
+ifeq ($(UNAME_S),FreeBSD)
+    DEFS += -DFREEBSD
+endif

In file pcapsipdump.cpp I noticed that:

-mkdir_p(dn, 0777); #On FBSD it creates directory not file
+mkdir_p(dirname(dn), 0777);#It works
pcapsipdump.cpp:489:19: warning: comparison of unsigned expression >= 0 is
      always true [-Wtautological-compare]
                if (last_cleanup>=0){

In line 181 :

    unsigned long last_cleanup=0;

Other changes in diff file.

Regards,
Marcelius

5 Attachments

Discussion

  • Aex Aey

    Aex Aey - 2018-10-28

    Hi Marcelius,

    Thanks a lot for the patches. I've refactored them a bit and added as [r139], [r140], and [r141]

     

    Related

    Commit: [r139]
    Commit: [r140]
    Commit: [r141]

  • Aex Aey

    Aex Aey - 2018-10-28
    • status: open --> accepted
    • assigned_to: Aex Aey
     
  • Aex Aey

    Aex Aey - 2019-08-30
    • status: accepted --> closed-fixed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.