X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Fhelper%2Freplacements.h;h=565fe9dca83600bb68dc9489ace7b814a5d7eaf8;hb=619b8383e9cf31159c16825206a5da7154451494;hp=ceb22584ccaa7fed50887989bfbfc017842f143d;hpb=39650e2273bcae868d9509fe36515936ce25aacb;p=openocd.git diff --git a/src/helper/replacements.h b/src/helper/replacements.h index ceb22584cc..565fe9dca8 100644 --- a/src/helper/replacements.h +++ b/src/helper/replacements.h @@ -21,7 +21,7 @@ * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * ***************************************************************************/ #ifndef REPLACEMENTS_H @@ -139,6 +139,13 @@ static inline unsigned usleep(unsigned int usecs) #include #include +/* Windows does not declare sockaddr_un */ +#define UNIX_PATH_LEN 108 +struct sockaddr_un { + uint16_t sun_family; + char sun_path[UNIX_PATH_LEN]; +}; + /* win32 systems do not support ETIMEDOUT */ #ifndef ETIMEDOUT @@ -221,8 +228,6 @@ static inline int socket_select(int max_fd, #ifndef HAVE_ELF_H -#include - typedef uint32_t Elf32_Addr; typedef uint16_t Elf32_Half; typedef uint32_t Elf32_Off; @@ -274,4 +279,8 @@ typedef struct { #endif /* HAVE_ELF_H */ +#if defined HAVE_LIBUSB1 && !defined HAVE_LIBUSB_ERROR_NAME +const char *libusb_error_name(int error_code); +#endif /* defined HAVE_LIBUSB1 && !defined HAVE_LIBUSB_ERROR_NAME */ + #endif /* REPLACEMENTS_H */