diff options
author | Aaron Burghardt | 2014-06-30 11:54:25 -0400 |
---|---|---|
committer | Nikias Bassen | 2014-08-22 07:30:42 +0200 |
commit | 0e16e0a1ddeca038bb00b1dd6f1fb799a47e4b7f (patch) | |
tree | 8456edf3d355c9dd9c46d9b937cf3e0aef69a06b | |
parent | 56fc97c5f344cb4fc88e40e3442f7fa74b5c7003 (diff) | |
download | libimobiledevice-0e16e0a1ddeca038bb00b1dd6f1fb799a47e4b7f.tar.gz libimobiledevice-0e16e0a1ddeca038bb00b1dd6f1fb799a47e4b7f.tar.bz2 |
Removed use of err() for Windows compatibility.
-rw-r--r-- | dev/filerelaytest.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/dev/filerelaytest.c b/dev/filerelaytest.c index 2afa6b6..f045620 100644 --- a/dev/filerelaytest.c +++ b/dev/filerelaytest.c @@ -18,9 +18,10 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include <err.h> +#include <errno.h> #include <stdio.h> #include <stdlib.h> +#include <string.h> #include <libimobiledevice/libimobiledevice.h> #include <libimobiledevice/lockdown.h> #include <libimobiledevice/file_relay.h> @@ -102,7 +103,8 @@ int main(int argc, char **argv) char buf[4096]; FILE *f = fopen("dump.cpio.gz", "wb"); if (!f) { - err(EXIT_FAILURE, "dump.cpio.gz"); + fprintf(stderr, "dump.cpio.gz: %s\n", strerror(errno)); + return EXIT_FAILURE; } setbuf(stdout, NULL); printf("receiving "); |