aboutsummaryrefslogtreecommitdiffstats
path: root/toolchain/gcc
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-11-16 18:15:00 +0000
committerJo-Philipp Wich <jow@openwrt.org>2015-11-16 18:15:00 +0000
commitab11edcd4c2325e62ea0e02c80f7630b8d191300 (patch)
tree77b811793f7889b27d244db96b6a73ec9eb973ba /toolchain/gcc
parentd99af7f05ac198ab8e995968f5b7e2ac2d942818 (diff)
downloadupstream-ab11edcd4c2325e62ea0e02c80f7630b8d191300.tar.gz
upstream-ab11edcd4c2325e62ea0e02c80f7630b8d191300.tar.bz2
upstream-ab11edcd4c2325e62ea0e02c80f7630b8d191300.zip
musl: fix handling of point-to-point interfaces in getifaddrs()
Current musl reports the peer (remote) address of a point-to-point interface and does not store the local address at all. Apply the same special treatment of IFA_LOCAL to musl's getifaddrs() which is also used in glibc and uclibc. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 47488
Diffstat (limited to 'toolchain/gcc')
0 files changed, 0 insertions, 0 deletions
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196
require 'libusb'

# Abstracts access to uBoot avr tiny85 bootloader - can be used only to upload bytes
class MicroBoot
  Functions = [
    :get_info,
    :write_page,
    :erase_application,
    :run_program
  ]
  
  # return all thinklets
  def self.all
    usb = LIBUSB::Context.new
    usb.devices.select { |device|
      device.idVendor == 0x16d0 && device.idProduct == 0x0753 #&& device.product == "\xB5B"
    }.map { |device|
      self.new(device)
    }
  end

  def initialize devref
    @device = devref
  end

  def info
    unless @info
      result = control_transfer(function: :get_info, dataIn: 4)
      flash_length, page_size, write_sleep = result.unpack('S>CC')