Ticket #812: 0001-Add-pppoe-to-haiku-image-and-minor-compilation-fixes.patch

File 0001-Add-pppoe-to-haiku-image-and-minor-compilation-fixes.patch, 4.3 KB (added by jessicah, 6 years ago)

Replaces patch 0042 of the patchset

  • build/jam/images/definitions/minimum

    From ab0f29e7c03ea21e17686c666606eae045870d1e Mon Sep 17 00:00:00 2001
    From: Jessica Hamilton <jessica.l.hamilton@gmail.com>
    Date: Sat, 5 Apr 2014 21:00:01 +1300
    Subject: [PATCH] Add pppoe to haiku image, and minor compilation fixes.
    
    ---
     build/jam/images/definitions/minimum                                 | 4 +++-
     build/jam/packages/Haiku                                             | 2 +-
     build/jam/packages/HaikuBootstrap                                    | 2 +-
     src/add-ons/kernel/network/ppp/ipcp/Protocol.cpp                     | 2 +-
     src/add-ons/kernel/network/ppp/pap/Protocol.cpp                      | 2 +-
     .../kernel/network/ppp/shared/libkernelppp/KPPPStateMachine.cpp      | 5 +++--
     6 files changed, 10 insertions(+), 7 deletions(-)
    
    diff --git a/build/jam/images/definitions/minimum b/build/jam/images/definitions/minimum
    index 2d7f832..af145f9 100644
    a b SYSTEM_SERVERS = [ FFilterByBuildFeatures  
    129129SYSTEM_NETWORK_DEVICES =
    130130    ethernet
    131131    loopback
     132    ppp
    132133;
    133134
    134135SYSTEM_NETWORK_DATALINK_PROTOCOLS =
    SYSTEM_NETWORK_DATALINK_PROTOCOLS =  
    136137    ethernet_frame
    137138    ipv6_datagram
    138139    loopback_frame
     140    ppp_frame
    139141;
    140142
    141 #SYSTEM_NETWORK_PPP = ipcp modem pap pppoe ;
     143SYSTEM_NETWORK_PPP = ipcp pap pppoe KPPPManager ;
    142144
    143145SYSTEM_NETWORK_PROTOCOLS =
    144146    icmp icmp6 ipv4 ipv6 
  • build/jam/packages/Haiku

    diff --git a/build/jam/packages/Haiku b/build/jam/packages/Haiku
    index 4920449..fc3fab3 100644
    a b AddFilesToPackage add-ons kernel network : dns_resolver ;  
    249249AddFilesToPackage add-ons kernel network devices : $(SYSTEM_NETWORK_DEVICES) ;
    250250AddFilesToPackage add-ons kernel network datalink_protocols
    251251    : $(SYSTEM_NETWORK_DATALINK_PROTOCOLS) ;
    252 AddFilesToPackage add-ons kernel network ppp: $(SYSTEM_NETWORK_PPP) ;
     252AddFilesToPackage add-ons kernel network ppp : $(SYSTEM_NETWORK_PPP) ;
    253253AddFilesToPackage add-ons kernel network protocols
    254254    : $(SYSTEM_NETWORK_PROTOCOLS) ;
    255255
  • build/jam/packages/HaikuBootstrap

    diff --git a/build/jam/packages/HaikuBootstrap b/build/jam/packages/HaikuBootstrap
    index a017b35..a0ec168 100644
    a b AddFilesToPackage add-ons kernel network : dns_resolver ;  
    204204AddFilesToPackage add-ons kernel network devices : $(SYSTEM_NETWORK_DEVICES) ;
    205205AddFilesToPackage add-ons kernel network datalink_protocols
    206206    : $(SYSTEM_NETWORK_DATALINK_PROTOCOLS) ;
    207 AddFilesToPackage add-ons kernel network ppp: $(SYSTEM_NETWORK_PPP) ;
     207AddFilesToPackage add-ons kernel network ppp : $(SYSTEM_NETWORK_PPP) ;
    208208AddFilesToPackage add-ons kernel network protocols
    209209    : $(SYSTEM_NETWORK_PROTOCOLS) ;
    210210
  • src/add-ons/kernel/network/ppp/ipcp/Protocol.cpp

    diff --git a/src/add-ons/kernel/network/ppp/ipcp/Protocol.cpp b/src/add-ons/kernel/network/ppp/ipcp/Protocol.cpp
    index 781ffe8..c737133 100644
    a b IPCP::RemoveRoutes()  
    653653uint8
    654654IPCP::NextID()
    655655{
    656     return (uint8) atomic_add(&fID, 1);
     656    return (uint8) atomic_add((int32*)&fID, 1);
    657657}
    658658
    659659
  • src/add-ons/kernel/network/ppp/pap/Protocol.cpp

    diff --git a/src/add-ons/kernel/network/ppp/pap/Protocol.cpp b/src/add-ons/kernel/network/ppp/pap/Protocol.cpp
    index 904f49b..ceaa41b 100644
    a b PAP::Pulse()  
    255255uint8
    256256PAP::NextID()
    257257{
    258     return (uint8) atomic_add(&fID, 1);
     258    return (uint8) atomic_add((int32*)&fID, 1);
    259259}
    260260
    261261
  • src/add-ons/kernel/network/ppp/shared/libkernelppp/KPPPStateMachine.cpp

    diff --git a/src/add-ons/kernel/network/ppp/shared/libkernelppp/KPPPStateMachine.cpp b/src/add-ons/kernel/network/ppp/shared/libkernelppp/KPPPStateMachine.cpp
    index 841837e..593cf62 100644
    a b KPPPStateMachine::~KPPPStateMachine()  
    7171uint8
    7272KPPPStateMachine::NextID()
    7373{
    74     return (uint8) atomic_add(&fID, 1);
     74    return (uint8) atomic_add((int32*)&fID, 1);
    7575}
    7676
    7777
    KPPPStateMachine::RCRBadEvent(net_buffer *nak, net_buffer *reject)  
    985985{
    986986    TRACE("KPPPSM: RCRBadEvent() state=%d phase=%d\n", State(), Phase());
    987987
    988     uint16 lenNak, lenReject;
     988    uint16 lenNak = 0;
     989    uint16 lenReject = 0;
    989990
    990991    switch (State()) {
    991992        case PPP_INITIAL_STATE: