]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/netkit-tftp/netkit-tftp-0.17/pack_tftphdr.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / netkit-tftp / netkit-tftp-0.17 / pack_tftphdr.patch
1
2 #
3 # Patch managed by http://www.holgerschurig.de/patcher.html
4 #
5
6 --- netkit-tftp-0.17/include/arpa/tftp.h~pack_tftphdr.patch
7 +++ netkit-tftp-0.17/include/arpa/tftp.h
8 @@ -10,10 +10,6 @@
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.
19 @@ -30,10 +26,7 @@
20   * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21   * SUCH DAMAGE.
22   *
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 $
25 - *
26 - * (Fixed for netkit to have well-defined field sizes)
27 + *     @(#)tftp.h      8.1 (Berkeley) 6/2/93
28   */
29  
30  #ifndef _ARPA_TFTP_H
31 @@ -54,14 +47,14 @@
32  #define        ERROR   05                              /* error code */
33  
34  struct tftphdr {
35 -       u_int16_t th_opcode;                    /* packet type */
36 +       short   th_opcode;                      /* packet type */
37         union {
38 -               u_int16_t tu_block;             /* block # */
39 -               u_int16_t tu_code;              /* error code */
40 -               char tu_stuff[1];               /* request packet stuff */
41 -       } th_u;
42 -       char th_data[1];                        /* data or error string */
43 -};
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__));
50  
51  #define        th_block        th_u.tu_block
52  #define        th_code         th_u.tu_code