3 # Patch managed by http://www.holgerschurig.de/patcher.html
6 --- netkit-tftp-0.17/include/arpa/tftp.h~pack_tftphdr.patch
7 +++ netkit-tftp-0.17/include/arpa/tftp.h
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 - * 3. All advertising materials mentioning features or use of this software
13 - * must display the following acknowledgement:
14 - * This product includes software developed by the University of
15 - * California, Berkeley and its contributors.
16 * 4. Neither the name of the University nor the names of its contributors
17 * may be used to endorse or promote products derived from this software
18 * without specific prior written permission.
20 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 - * From: @(#)tftp.h 8.1 (Berkeley) 6/2/93
24 - * $Id: tftp.h,v 1.1 2000/07/22 18:59:20 dholland Exp $
26 - * (Fixed for netkit to have well-defined field sizes)
27 + * @(#)tftp.h 8.1 (Berkeley) 6/2/93
32 #define ERROR 05 /* error code */
35 - u_int16_t th_opcode; /* packet type */
36 + short th_opcode; /* packet type */
38 - u_int16_t tu_block; /* block # */
39 - u_int16_t tu_code; /* error code */
40 - char tu_stuff[1]; /* request packet stuff */
42 - char th_data[1]; /* data or error string */
44 + unsigned short tu_block; /* block # */
45 + short tu_code; /* error code */
46 + char tu_stuff[1]; /* request packet stuff */
47 + } __attribute__ ((__packed__)) th_u;
48 + char th_data[1]; /* data or error string */
49 +} __attribute__ ((__packed__));
51 #define th_block th_u.tu_block
52 #define th_code th_u.tu_code