[Snort-devel] Patch: resolves compilation issues on tru64 os

Hari Gopal krishnha at ...2380...
Thu Feb 5 11:24:02 EST 2004


Hi !
I tried to compile snort-2.1.1rc1 on tru64 OS. It is failing at three
points.

1) when it is compiling spo_alert_full.c
	src/event.h
	cc: Error: ../../src/event.h, line 36: Missing type specifier or
type qualifier. (missingtype)
    u_int32_t sig_generator;   /* which part of snort generated the
alert? */

	etc....
	include sys/bitypes.h in src/event.h it proceeds till it
encounters sp_byte_check.c
2)when it is compiling  sp_byte_check.c
	 src/bounds.h:
	cc: Error: ../../src/bounds.h, line 85: Invalid expression.
(badexpr)
     		if(!inBounds(start,end, dst) ||
!inBounds(start,end,((u_int8_t*)dst)+n))
Etc..
	include sys/bitypes.h in src/bounds.h it proceeds till it
encounters signature.c
3) when it is compiling src/signature.c
cc: Error: src/signature.h, line 82: Missing type specifier or type
qualifier. (missingtype)
    u_int32_t generator;
----^
Etc....
	include sys/bitypes.h in src/signature.h

 .....build is succesfull...


	Basically it is failing to recognise u_int32_t ,u_int8_t and
u_int16_t.
When we add sys/bitypes.h in the above three
headers(event.h,bounds.h,signature.h) compilation is
smooth.(sys/bitypes.h which contains the definations of u_int32_t
,u_int8_t and u_int16_t ).

if possible I want to add these changed in the main stream of snort code
so that code can be compiled on tru64 os smoothly

I Changed the following files.
1) configure.in: added a line AC_CHECK_HEADER(sys/bitypes.h)
2) config.h.in: added two lines 
		/* some comment.....*/
		#undef HAVE_SYS_BITYPES_H 
3) src/event.h:
   src/bounds.h
   src/signature.h
	added the below lines:
		#ifdef OSF1
		#ifdef HAVE_SYS_BITYPES_H
		#include <sys/bitypes.h>
		#endif

And run the autoreconf in snort-2.1.1-RC1-new and 
	diff -Nu snort-2.1.1-RC1 snort-2.1.1-RC1-new >patch

I tested by patching the snort-2.1.1-RC1 on tru64 os and linux.
So it compiled smoothly on tru64 OS and linux.So my patch for try64 os
is not creating any problem for other os (linux).
I am attaching my patch as an attachment.

Thanks and regards,
Hari Gopal

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: application/octet-stream
Size: 276864 bytes
Desc: not available
URL: <https://lists.snort.org/pipermail/snort-devel/attachments/20040205/d1db0420/attachment.obj>


More information about the Snort-devel mailing list