zoukankan      html  css  js  c++  java
  • Android 交叉编译 IPerf3

    I Config

    $ cd iperf/

    $ export PATH=/home/osa/android-ndk/bin:$PATH
    $ ./configure --host=arm-linux CC=arm-linux-androideabi-gcc CXX=arm-linux-androideabi-g++ CFLAGS=-static CXXFLAGS=-static
     

    II Edit net.c

    --- net.c       2015-04-20 14:34:34.610766731 +0900

    +++ net.c.org   2015-04-20 14:34:21.050766682 +0900
    @@ -37,7 +37,7 @@
     #include <assert.h>
     #include <netdb.h>
     #include <string.h>
    -#include <fcntl.h>
    +#include <sys/fcntl.h>
     
     #ifdef HAVE_SENDFILE
     #ifdef linux
     

    IV Edit iperf_api.c

    --- iperf_api.c     2015-04-20 14:39:40.682767820 +0900

    +++ iperf_api.c.org 2015-04-20 14:39:25.010767765 +0900
    @@ -2570,7 +2570,7 @@
     {
         int i;
         struct iperf_stream *sp;
    -    char template[] = "/data/local/tmp/iperf3.XXXXXX";
    +    char template[] = "/tmp/iperf3.XXXXXX";
         h_errno = 0;
     

    V Edit  src/Makefile

    --- Makefile     2015-04-20 14:45:35.246769083 +0900

    +++ Makefile.org 2015-04-20 14:45:25.982769050 +0900
    @@ -596,9 +596,9 @@
     iperf3_profile_SOURCES = main.c
            $(libiperf_la_SOURCES)
     
    -iperf3_profile_CFLAGS = -g
    +iperf3_profile_CFLAGS = -pg -g
     iperf3_profile_LDADD = libiperf.la
    -iperf3_profile_LDFLAGS = -g
    +iperf3_profile_LDFLAGS = -pg -g
     
     # Specify the sources and various flags for the test cases
     t_timer_SOURCES = t_timer.c
     

    VI Make

    Ignore fatal error: sysexits.h: No such file or directory. and src/iperf3 is created
  • 相关阅读:
    Spring框架:第八章:声明式事务
    Spring框架:第七章:AOP切面编程
    Spring框架:第六章:注解功能
    Jmeter之WebService接口测试
    Jmeter中的参数化常用的几种方式
    Jmeter之定时器
    Jmeter之断言——检查点
    Jmeter重要组件介绍(一)
    Jmeter中之各种乱码问题解决方案
    Jmeter之https请求
  • 原文地址:https://www.cnblogs.com/blowing-in-the-wind/p/6037848.html
Copyright © 2011-2022 走看看