sim: bfin: fix up linux-fixed-code.h generation [PR sim/10143]
[deliverable/binutils-gdb.git] / gdb / common / gdb_socket.h
CommitLineData
366c75fc
PA
1/* Copyright (C) 2015 Free Software Foundation, Inc.
2
3 This file is part of GDB.
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
17
18#ifndef GDB_SOCKET_H
19#define GDB_SOCKET_H
20
21#if USE_WIN32API
22#include <winsock2.h>
23#else
24#include <sys/socket.h>
25#include <netinet/in.h>
26#if HAVE_SYS_UN_H
27#include <sys/un.h>
28#endif
29#endif
30
31/* Use this union instead of casts between struct sockaddr <-> struct
32 sockaddr_foo to avoid strict aliasing violations. */
33
34union gdb_sockaddr_u
35{
36 struct sockaddr sa;
37 struct sockaddr_in sa_in;
38#if HAVE_SYS_UN_H
39 struct sockaddr_un sa_un;
40#endif
41};
42
43#endif /* GDB_SOCKET_H */
This page took 0.024551 seconds and 4 git commands to generate.