X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Fhelper%2Freplacements.h;h=565fe9dca83600bb68dc9489ace7b814a5d7eaf8;hb=de353010c314130d9d45b080142c0a9a4ad0d447;hp=6f2e959519090163e3ca645b3479df698b58d2fc;hpb=8b00e56e6433cff3ff818835953b27765aaabab0;p=openocd.git diff --git a/src/helper/replacements.h b/src/helper/replacements.h index 6f2e959519..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 @@ -128,12 +128,8 @@ static inline unsigned usleep(unsigned int usecs) return 0; } #else -#if BUILD_ECOSBOARD -void usleep(int us); -#else #error no usleep defined for your platform #endif -#endif #endif /* HAVE_USLEEP */ /* Windows specific */ @@ -143,6 +139,13 @@ void usleep(int us); #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 @@ -225,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; @@ -278,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 */