Fix bug:

	event_buffer.pos is not set correctly.
	find_empty_watchinfo returns invalid address.
Add flag for gcc: -std=c99