Please note: This project is no longer active. The website is kept online for historic purposes only.
If you´re looking for a Linux driver for your Atheros WLAN device, you should continue here .

Ticket #1362 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

patch: gcc-2.95 compile errors

Reported by: Assigned to:
Priority: minor Milestone: version 0.9.5
Component: madwifi: other Version: v0.9.3.1
Keywords: gcc-2.95 Cc:
Patch is attached: 0 Pending:


madwifi does not compile with gcc-2.95 because of 2 lines in the 802.11 code (see patch).


madwifi-gcc-2.95.diff (0.9 kB) - added by on 06/05/07 23:07:23.
madwifi-gcc-2.95_v2.diff (0.9 kB) - added by anonymous on 06/07/07 15:46:09.

Change History

06/05/07 23:07:23 changed by

  • attachment madwifi-gcc-2.95.diff added.

06/06/07 01:14:04 changed by

that patch won't work. int foo[]; allocates the array at the end of the structure, int *foo; creates a pointer to memory somewhere else.

A better patch would be to replace int foo[]; with int foo[0]; if gcc-2.95 would let you (from my vague memory it does), or int foo[1]; and check for things that use sizeof(outerstruct) as the size of the struct will now be wrong.

06/06/07 15:07:20 changed by says:

"In ISO C90, you would have to give contents (bar in my example) a length of 1, which means either you waste space or complicate the argument to malloc."

Does this mean hat if I use int bar[1] and I do'nt mind to waste space, I do not have to change any sizeof() arguments?

Another question: how do I check for gcc < 3 ?

06/07/07 15:45:01 changed by anonymous

gcc-2.95 accepts 'int foo[0];' - it does exactly the same as 'int foo[];'. It works very well on my Linux based ADSL modem/wireless AP :-). I attached a new patch. No need to check for gcc < 3. Please apply ;-).

Jan Pieter

06/07/07 15:46:09 changed by anonymous

  • attachment madwifi-gcc-2.95_v2.diff added.

06/16/07 08:29:54 changed by dyqith

  • status changed from new to closed.
  • resolution set to fixed.

I just checked, someone already applied this.

It's already in r2468

06/27/07 07:26:34 changed by mrenzmann

  • milestone set to version 0.9.4.

02/11/08 06:19:40 changed by mrenzmann

  • milestone changed from version 0.9.4 to version 0.9.5.